Optical Scanning Type Photoelectric Switch

ABSTRACT

There is provided an optical scanning type photoelectric switch capable of facilitating control of holding a set detection sensitivity, wherein first and second reflection surfaces with different reflection factors are built as reference objects in the optical scanning type photoelectric switch, and arranged in a measurement invalid range in rotation of a scanning mirror, a light projection path, a light reception path, a laser light source LD and a light receiving element, which are used for scanning in the measurement area, are shared, and when a light reception intensity of the white second reflection surface is smaller than a “reference light reception intensity (white)”, a light projection driving section is controlled to increase the light projection intensity.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims foreign priority based on Japanese PatentApplication No. 2009-021047, filed Jan. 31, 2009, the contents of whichis incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a safety photoelectric switch.

2. Description of the Background Art

As seen in Japanese Patent Application Laid-Open No. H4-310890 andJapanese Patent Application Laid-Open No. H3-175390, an optical scanningtype photoelectric switch is known which two-dimensionally performsscanning with light to detect an object while detecting a position ofthis object. As also referred to as a safety scanner, a safety laserscanner, and the like, this optical scanning type photoelectric switchprovides a protection area around a machine, a robot or the like as adanger source, and outputs to the danger source a safety signal notpermitting its operation when an operator or the like enters thisprotection area.

A detection sensitivity of the optical scanning type photoelectricswitch is decided based upon a light projection intensity or a lightreception intensity, and on top of this, as shown in Japanese PatentApplication Laid-Open No. H3-175390, when a mirror for polarizing lightis provided inside the optical scanning type photoelectric switch, thedetection sensitivity of the optical scanning type photoelectric switchis decided based upon optical characteristics of a lens for collectinglight and a scanning mirror for performing scanning with light.

SUMMARY OF THE INVENTION

As described above, the detection sensitivity of the optical scanningtype photoelectric switch is influenced not only by optical systemcomponents inside the optical scanning type photoelectric switch, butalso by the light projection intensity or the light reception intensity.Hence, for example when the light projection intensity or the lightreception intensity varies due to a secular change or an ambienttemperature, the detection sensitivity of the optical scanning typephotoelectric switch also varies. The variation in detection sensitivityof the optical scanning type photoelectric switch is undesirable for thereason of the optical scanning type photoelectric switch being safeequipment. It is thereby important to design the optical scanning typephotoelectric switch such that its detection sensitivity does not exceedan allowable range.

Especially when there is a large variation due to the secular change orthe ambient temperature at which the optical scanning type photoelectricswitch is used, a predictable amount of validation needs to be added asa margin to the allowable range, to define a product specification.Naturally, when designing is performed in consideration of the secularchange or the ambient temperature in the worst condition, a considerablylarge margin needs to be added to the allowable range, thereby putting alarge restriction on the flexibility of the product specification.

An object of the present invention is to provide an optical scanningtype photoelectric switch capable of facilitating control of holding aset detection sensitivity.

A further object of the present invention is to provide an opticalscanning type photoelectric switch that can be autonomously shifted to asafety state when the control of holding the set detection sensitivitycomes into the state of being difficult to perform.

According to the present invention, the technical problem isaccomplished by providing an optical scanning type photoelectric switch,which performs two-dimensional scanning with light to detect an object,and also measures a distance to the object to sense a two-dimensionalposition of the object, the switch having inside thereof a lightprojection path along which light emitted by a light projecting elementis projected toward a measurement area through a trochoid first scanningmirror; a light reception path along which reflected light reflected bythe object is guided to a light receiving element through a secondscanning mirror and received by the light receiving element; and areference object provided on the opposite side to the measurement area,wherein the light projection path from the light projecting element tothe first scanning mirror and the light reception path from the secondscanning mirror to the light receiving element are shared so that lightprojected to the reference object and reflected by the reference objectis received by the light receiving element.

Namely, according to the present invention, the reference object isarranged inside the optical scanning type photoelectric switch, andlight projection/reception paths used at the time of projecting light tothe measurement area and receiving reflected light therefrom are made toserve also as the paths for projecting light to the reference object andreceiving light therefrom, thereby facilitating control of holding a setdetection sensitivity.

In a preferred embodiment for this control of holding a set detectionsensitivity, the optical scanning type photoelectric switch has: astorage device for storing reference light reception signal information,which is obtained at the time of projecting light to the referenceobject, when the detection sensitivity of the optical scanning typephotoelectric switch is adjusted to the optimum; and a detectionsensitivity adjusting device capable of adjusting the detectionsensitivity of the optical scanning type photoelectric switch, whereinthe detection sensitivity of the optical scanning type photoelectricswitch is adjusted by the detection sensitivity adjusting device basedupon actual light reception signal information, which is obtained at thetime of projecting light to the reference object, and the referencelight reception signal information.

Further, in a preferred embodiment of the present invention, the opticalscanning type photoelectric switch has as the reference object aplurality of reflection surfaces with different reflection factors builttherein, and further has: a failure detecting device for determiningfailure when actual light reception signal information, which isobtained by projecting light to the reflection surface with a lowreflection factor among the reference objects, is out of a predeterminedrange with the reference light reception signal information taken as areference, based upon the light reception signal information obtainedfrom the reflection surface with a low reflection factor and thereference light reception signal information; and an output controllingdevice for shifting the optical scanning type photoelectric switch to asafety state when the failure detecting device determines failure.According to this embodiment, when the control of holding the setdetection sensitivity comes into the state of being difficult toperform, the optical scanning type photoelectric switch can beautonomously shifted to a safety state.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view for explaining basic terms of an optical scanning typephotoelectric switch;

FIG. 2 is a view for explaining an example of applying an opticalscanning type photoelectric switch related to the present invention;

FIG. 3 is a view for explaining a configuration of an optical system ofthe optical scanning type photoelectric switch related to the presentinvention;

FIG. 4A is a diagram showing a whole configuration of the opticalscanning type photoelectric switch of FIG. 3, and FIG. 4B is a view forexplaining a protection area and an warning area;

FIG. 5 is an external view of the optical scanning type photoelectricswitch related to the present invention;

FIG. 6A is a front view of the optical scanning type photoelectricswitch related to the present invention, and FIG. 6B is a view of a userinterface section having been extracted and seen from the user side;

FIG. 7 is a vertical sectional view for explaining an internal structureof the optical scanning type photoelectric switch related to the presentinvention;

FIG. 8 is a view related to FIG. 5, with a light transmittance coverthat forms a light projection window detached from the optical scanningtype photoelectric switch;

FIG. 9 is a perspective view of an apparatus body constituting theinternal structure of the optical scanning type photoelectric switchrelated to the present invention, as well as a view showing a statewhere a scanning mirror faces the opposite side to a measurement area;

FIG. 10 is a sectional view of the apparatus body of FIG. 9;

FIG. 11 is a plan view of two kinds of, white and black, reflectedsurfaces as reference objects, having different reflection factors andbuilt in the optical scanning type photoelectric switch;

FIG. 12 is a view showing a state where laser pulse light is projectedto the two reflected surfaces as the reference objects of FIG. 11;

FIG. 13 is a view showing the optical scanning type photoelectric switchconnected with a personal computer installed with a program for settingthe protection area and the warning area;

FIG. 14 is a functional block diagram for setting the protection area;

FIG. 15 is a region setting screen displayed on a display of thepersonal computer;

FIGS. 16A to 16C are views each for explaining a process of setting theprotection area;

FIGS. 17A to 17C are views each for explaining another process ofsetting the protection area;

FIG. 18 is a region setting screen at the time of first setting theprotection area in setting a muting area;

FIG. 19 is a region setting screen in an intermediate process of settingthe muting area in the protection area set in FIG. 18;

FIG. 20 is a diagram for explaining the protection area with the mutingarea set therein;

FIG. 21 is a muting setting screen for setting a variety of functionsand the muting time in the muting area;

FIG. 22 is a whole constitutional view of a conveyance system with themuting area set in the optical scanning type photoelectric switch;

FIG. 23 is a functional block diagram of the optical scanning typephotoelectric switch related to a muting function;

FIGS. 24A to 24C are views each for explaining the relation between aplurality of mute sensors and a work;

FIGS. 25D and 25E are views each for explaining the relation between theplurality of mute sensors and the work, subsequently to FIG. 24;

FIG. 26 is a time chart related to muting;

FIG. 27 is a view for explaining a gate configuration where a pluralityof muting areas are set and the muting areas are switch-controlled inaccordance with the kind of work;

FIG. 28 is a view for explaining, in association with FIG. 27, that arelatively low muting area is set when a relatively low work passesthrough the gate;

FIG. 29 is a view for explaining, in association with FIG. 27, that arelatively high muting area is set when a relatively high work passesthrough the gate;

FIG. 30 is a view for explaining a gate configuration where, in order todetect the height of the work, sensors installed at different heights ofthree levels are prepared and the muting area is switched based upon theheight of the work detected by the sensors;

FIG. 31A is a view for explaining that a low muting area correspondingto a low work is set when the low work is detected, and FIG. 31B is aview for explaining that a moderately high muting area corresponding toa moderately high work is set when the moderately high work is detected,in association with FIG. 30;

FIG. 32C is a view for explaining that a high muting area correspondingto a high work is set when the high work is detected, and FIG. 32D is aview for explaining that, when relatively the highest work is detected,a very high muting area corresponding to this very high work is set, inassociation with FIGS. 30 and 31;

FIG. 33 is a view for explaining an example of installing the opticalscanning type photoelectric switch on a traveling truck and switchingthe protection area in accordance with a passage along which thetravelling truck is travelling;

FIG. 34 is a view for explaining an example of applying an opticalscanning type photoelectric switch provided with outputs of a pluralityof systems;

FIG. 35 is a block diagram for explaining an operation of the opticalscanning type photoelectric switch provided with outputs of two systemsin association with FIG. 34;

FIG. 36 is a time chart for explaining an example of providing a phaseto an inspection signal in superimposition of the inspection signal on asafety signal in each of outputs of a plurality of systems;

FIG. 37 is a view for explaining that a problem of interference betweenadjacent two optical scanning type photoelectric switches is apt tooccur;

FIG. 38 is a time chart for projection light pulses when interferenceoccurs between the two optical scanning type photoelectric switches;

FIG. 39 is a view for explaining a condition where laser light isradially projected by rotation of a scanning mirror of the opticalscanning type photoelectric switch;

FIG. 40 is a diagram for explaining a light projection period of thelight projection pulse;

FIG. 41 is a diagram for explaining a rotation period of the scanningmirror, namely scanning period;

FIG. 42 is a diagram for explaining an example of control where thelight projection period is made different between the adjacent opticalscanning type photoelectric switches, so as to prevent interference;

FIG. 43 is a diagram showing in the form of a block diagram a basicconfiguration of the optical scanning type photoelectric switch relatedto the present invention;

FIG. 44 is a diagram for explaining an example of control where aplurality of optical scanning type photoelectric switches are mutuallyconnected and a phase is provided to the light projection timing, so asto prevent interference;

FIG. 45 is a diagram for explaining an example of control where a phaseis provided to the light projection timing when interference is sensedin the adjacent optical scanning type photoelectric switches;

FIG. 46 is a diagram for explaining a change in display mode of a liquidcrystal display section installed in the user interface section of theoptical scanning type photoelectric switch to which the presentinvention is applied;

FIG. 47 is a diagram for explaining transition of display in a monitormode of FIG. 46;

FIG. 48 is a diagram for explaining transition of display in a settingmode of FIG. 46;

FIG. 49 is a view for explaining that, by means of a personal computeras a terminal with a display which is connected to the optical scanningtype photoelectric switch, a direction of generation of disturbancelight can be displayed on a display of the personal computer;

FIG. 50 is a diagram for explaining that an error due to disturbancelight is displayed in the liquid crystal display section of the opticalscanning type photoelectric switch;

FIG. 51 is a flowchart for explaining a specific technique for sensingdisturbance;

FIG. 52 is a view showing an example where an indicator indicating adirection of disturbance is installed in the optical scanning typephotoelectric switch;

FIG. 53 is a flowchart for explaining a procedure for autonomouslyholding a detection sensitivity by means of a reference object built inthe optical scanning type photoelectric switch, and storing a referencelight reception intensity, required when contamination or the like ofthe reference object is regarded as a failure of the optical scanningtype photoelectric switch, into a memory in factory shipment;

FIG. 54 is a flowchart for explaining a processing procedure forautonomously holding the detection sensitivity of the optical scanningtype photoelectric switch by means of the reference light receptionintensity stored into the memory by the procedure of FIG. 53; and

FIG. 55 is a flowchart for explaining a processing procedure forshifting the optical scanning type photoelectric switch to a safetystate by detecting a contamination or the like of the reference objectbuilt in the optical scanning type photoelectric switch by means of thereference light reception intensity stored into the memory by theprocedure of FIG. 53 upon generation of the contamination or the like.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Examples

With reference to FIG. 1, as generalities, basic terms of an opticalscanning type photoelectric switch: “measurement area”; “maximumprotection area”; “warning area”; and “protection area”, are described.The “maximum protection area” means a region where objects having avariety of reflection factors from a low reflection factor object to ahigh reflection factor object, which are stipulated by the safetystandard, are detectable by the optical scanning type photoelectricswitch. The “measurement area” means a region where an object having astandard reflection factor is detectable by the optical scanning typephotoelectric switch, and this “measurement area” completely includesthe “maximum protection area”.

As is known, the optical scanning type photoelectric switch is used totwo-dimensionally scan the maximum protection area with light such aslaser light and monitor scanning light reflected from the maximumprotection area, thereby to monitor safety inside the area.

The “measurement area” and “maximum protection area” are ones specificto each optical scanning type photoelectric switch, and are not areassettable by the user. On the other hand, the “protection area” and the“warning area” are areas settable by the user. The “protection area” canbe settable only inside the “maximum protection area”. Meanwhile, the“warning area” is settable inside the “measurement area”.

With reference to FIG. 2, the maximum protection area of the opticalscanning type photoelectric switch 1 to which the present invention hasbeen applied is an area having a radial distance of about 4 meters, andas described above, the “protection area” is settable by the user with arestriction to the inside of this maximum protection area having theradial distance of about 4 meters.

The “protection area” is made to correspond to a safety output forhalting a startup and an operation of a machine (e.g. robot), and forexample when an operator enters this “protection area”, the opticalscanning type photoelectric switch 1 supplies the machine with a safetyoutput indicating non permission of operation, namely an OFF-stateoutput.

The “warning area” is not made to correspond to the safety output, butmade to correspond to a non-safety output (normal output) issuing analert about getting closer to the machine. Further, a scan angle of theoptical scanning type photoelectric switch 1 is 270 degrees at themaximum, and the protection area and the warning area can be settable toan area in the rear of the optical scanning type photoelectric switch 1.

In the example of FIG. 2, an operation area of a robot 2 and an areainstalled with a conveyance apparatus are partitioned by a protectivefence 3, and an area adjacent to the operation area of the robot 2 inthe area defined by this protective fence 3 is set as a protection areaA. The optical scanning type photoelectric switch 1 is installed formonitoring this protection area A. For example when an operator M entersthe protection area A, the entry is immediately sensed by the opticalscanning type photoelectric switch 1. It is to be noted that as for theprotection area A illustrated in FIG. 2, a protection area A (low)having a relatively low detection capability and a protection area A(high) having a relatively high detection capability are prepared. Thesetwo kinds of protection areas having different detection capabilities,the protection area A (low) and the protection area A (high), areeffective in the case of the optical scanning type photoelectric switch1 being provided with a plurality of output systems which are describedlater.

FIG. 3 is a view for explaining a basic structure of an optical systemof the optical scanning type photoelectric switch 1. With reference toFIG. 3, elements of the optical system of the optical scanning typephotoelectric switch 1 are described.

Light Path:

The optical scanning type photoelectric switch 1 executes detection withlaser light having a wavelength included in an infrared ray region. Theoptical scanning type photoelectric switch 1 scans a horizontal surfacewith laser light at a predetermined pitch and receives reflected lighttherefrom, to detect an entry person or an object M.

Light Irradiation Device:

In FIG. 3, reference symbol LD denotes a light projecting element. Laserlight L1 emitted by the light projecting element LD passes through alight projecting lens 10, polarized by first and second mirrors(reflection mirrors) 11, 12 for light projection, and travels downwardin a direction along a predetermined vertical first axis line Z.Therefore, the light projecting lens 10 and the first and second mirrors11, 12 for light projection constitute a light irradiation device forperforming irradiation with the laser light L1 along the vertical firstaxis line Z. The light projecting element LD emits the laser light L1 inpulse form intermittently in a fixed period, and this laser light isemitted from the light projecting element LD at every 0.36 degrees. Itis to be noted that, as would been understood by the skilled person inthe art from the following description, a detection theory of theoptical scanning type photoelectric switch 1 does not utilize acharacteristic specific to laser light such as light coherence. It thusgoes without saying that a laser light source as a light projectingsource of the optical scanning type photoelectric switch 1 is merely anexample, and the light source is not restricted to this laser light, buta variety of light sources can be adopted. Incidentally, a laser diodeis a high-luminance point light source, and excellent in high-speedresponse at the time of pulse light emission. Therefore, the laser diodecan be preferably adopted as the light source of the optical scanningtype photoelectric switch 1.

Optical Scanning Device 14:

The laser light L1 polarized by the second mirror 12 for lightprojection in the direction along the vertical first axis line Z travelstoward an optical scanning device 14 located below the second mirror 12.The optical scanning device 14 is configured of a scanning mirrorarranged in the state of being inclined from the vertical first axisline Z by substantially 45 degrees. This scanning mirror 14 isrotationally driven with the vertical first axis line Z at the center.The optical scanning device (scanning mirror) 14 is rotationally drivenby a motor 24 (FIG. 7) (not shown in FIG. 3). As shown by dotted linesin FIG. 4B, the laser light L1 scans the horizontal surface orthogonalto the vertical first axis line Z by a rotational operation of thescanning mirror 14 with the vertical first axis line Z at the center.Reference symbol A shown in FIG. 4B denotes a “protection area”exemplarily set, and reference symbol B denotes a “maximum protectionarea”.

It is to be noted that, although the scanning mirror 14 is configured ofan axis rotational mirror used in both light projection and lightreception in the illustrated example, as a modified example, such aconfiguration may be adopted where light projection and light receptionare constituted of individual scanning mirrors, the scanning mirror forlight projection and the scanning mirror for light reception arearranged at the same axis and also arranged so as to face the samedirection, and then synchronously rotated.

Received Light Reflecting Body 21, Photoelectric Conversion Element 22:

When the object M is present in the warning area or the protection areaA, reflected light L2 reflected by this object M is inputted into theoptical scanning type photoelectric switch 1, and this reflected lightL2 is reflected by the scanning mirror 14, and then collected by a lightreceiving lens 20 (FIG. 3). The light receiving lens 20 has an opticalaxis agreeing with the vertical first axis line Z, and the reflectedlight L2 collected by the light receiving lens 20 is polarized by areceived light reflecting body 21, and collected into a photoelectricconversion element 22 as a light receiving element.

Continuously referring to FIG. 3, the received light reflecting body 21is arranged as being inclined from the vertical first axis line Z bysubstantially 45 degrees, and the optical axis of the reflected light L2collected by the light receiving lens 20 is polarized by this receivedlight reflecting body 21 in a direction along a second axis line Y in alateral direction substantially orthogonal to the vertical first axisline Z, and the reflected light L2 after this polarization is receivedby the photoelectric conversion element 22. Upon receipt of thereflected light L2, the photoelectric conversion element 22 performsphotoelectric conversion, to generate a light reception signal.

With reference to FIG. 4A, the optical scanning type photoelectricswitch 1 has a control device 30 configured of a CPU, a microcomputerincluding a memory, an FPGA, and the like. FIG. 4A shows a total systemof the optical scanning type photoelectric switch 1 in terms of a blockdiagram. The light projecting element LD is controlled by the controldevice 30, and a signal of the photoelectric conversion element 22 isinputted into the control device 30.

External Configuration of Optical Scanning Type Photoelectric Switch 1:

With reference to FIG. 5, the optical scanning type photoelectric switch1 has a user interface section 32 located as inclined toward the frontsurface of the top end of the switch. With the user interface section 32arranged as inclined, an area of the user interface section 32 can beexpanded and also becomes easily accessible by the user.

In the inclined user interface section 32, a rectangular liquid crystaldisplay section 34 is provided at its center portion, and a plurality oftouch-tone operation buttons 36 are arranged on one side to and belowthe liquid crystal display section 34. Further, on the other side to theliquid crystal display section 34, a plurality of LED indicators 38 arearranged while separated vertically into lateral two columns, and anoperating state of the optical scanning type photoelectric switch 1 isindicated by these plurality of the LED indicators 38.

In FIG. 6B, the user interface section 32 is extracted and thentwo-dimensionally illustrated. On the right side to the liquid crystaldisplay section 34 when seen from a position facing the user interfacesection 32, buttons 36 a, 36 b provided with up and down marks arearranged. Below the liquid crystal display section 34, a button 36 dprovided with letters of Esc is arranged on the left side and a button36 e provided with letters of Enter is arranged on the right side,sandwiching therebetween a center button 36 c provided with a rightarrow.

Obliquely inclining the user interface section 32 to expand its area canarrange the relatively large liquid crystal display section 34. On topof this, the plurality of touch-tone operation buttons 36 can bearranged in the user interface section 32, and with these operationbuttons 36 installed on the optical scanning type photoelectric switch1, a design can be made where a setting operation for a setting requiredby the user can be performed directly on the optical scanning typephotoelectric switch 1 without an external personal computer as aterminal with a display. Here, the liquid crystal display section 34 canbe displayed with 12 letters by four rows, and information necessary forthe user is provided by means of the liquid crystal display section 34capable of displaying relatively a large amount of information as thusdescribed, thereby allowing the user to perform a necessary settingoperation only by operating the operation buttons 36 while looking atthe liquid crystal display section 34 without the external personalcomputer.

Especially in the case of setting a function directly related to thesafety, for example in setting the “protection area”, it is necessary tomake the user verify whether a setting is correctly performed, and thesetting of the function directly related to the safety, namely thesetting of the “protection area” in this case, is reflected only aftercompletion of a verifying operation by the user. The verifying operationby the user is executed in the following procedure. The optical scanningtype photoelectric switch 1 is designed such that, successively to asetting input, setting contents, which were inputted by a user and havenot been reflected, are displayed in the liquid crystal display section34 by means of letters, figures, symbols, and the like. While it is asdescribed above that the user is made to verify whether or not thecontents displayed in the liquid crystal display section 34 agree withcontents to be set, it is designed so as to request for the user to makean OK instruction accompanied by an operation of the operation button 36when the user determines the agreement. The optical scanning typephotoelectric switch 1 then completes verification of the contentsdisplayed in the liquid crystal display section 34 by receiving the OKinstruction, and when there are unverified contents, the opticalscanning type photoelectric switch 1 displays the contents in the liquidcrystal display section 34 and waits for an OK instruction from theuser. The optical scanning type photoelectric switch 1 completes thestate of the verifying operation by receiving OK instructions concerningall the contents, and reflects the contents, the verifying operations onwhich have been completed, to the setting. On the other hand, when theuser determines that the contents displayed in the liquid crystaldisplay section 34 do not agree with the contents to be set, the usercan instruct cancellation with the operation button 36. By accepting thecancellation instruction, the optical scanning type photoelectric switch1 completes the verifying operation without reflecting all the inputtedcontents to the setting, and subsequently transits to the state ofaccepting a setting input. However, verification of inputted contentsconcerning a position and an area of the protection area A and the likeis insufficient only by verification of agreement of displayed contents,and hence the user practically performs a verifying operation for theinputted contents concerning the position and the area of the protectionarea A and the like by holding a test body in a location correspondingto a position and an area to be set by the user after validating adistance measuring function that includes the optical system of theoptical scanning type photoelectric switch 1. It is thus preferable todisplay in the liquid crystal display section 34 not only a screen foracceptance of setting of the function directly related to the safety butalso a screen for making the user verify set contents, and execute theforegoing verification by the user with this verification screen.

FIG. 6A is a front view of the optical scanning type photoelectricswitch 1, where a horizontal surface that is scanned with laser light,namely a scanning surface 39, is indicated by a lateral line. As seenfrom FIG. 7 illustrating an internal configuration of the opticalscanning type photoelectric switch 1, the optical scanning typephotoelectric switch 1 has an apparatus body 60 (FIG. 9) formed byunitizing mechanical components such as the optical scanning device(scanning mirror) 14 and the motor 24 for driving this, and at thebottom of the apparatus body 60, the motor 24 is arranged. At therotational axis of the motor 24, for example, a photoelectric rotaryencoder 25 is provided. The rotary encoder 25 has a plurality of slitsequally spaced in a circumferential direction, and based upon an outputdepending upon light passing through these slits, a rotational angle ofthe optical scanning mirror 14 is calculated, so as to obtain polarizeddirections of the projected/received lights L1, L2.

Returning to FIG. 4A, the control device 30 is connected with the liquidcrystal display section 34, the LED indicators 38 and the operationbuttons 36. Further, the control device 30 is connected with a firstconnector 40, and this first connector 40 can be coupled with aconnector 44 of an external cable 42 extending from external equipment.

The control device 30 is provided with a distance calculating device 51,a direction calculating device 52, a position recognizing device 53, adiscrimination device 54, a contamination sensing device 55, a signalgenerating device 56, a display controlling device 57, a failure sensingdevice 58, and the like.

Distance Calculating Device 51:

The distance calculating device 51 calculates a distance to the object Mbased upon a light reception signal from the photoelectric conversionelement 22 in each polarized direction. Namely, a distance to the objectM can be calculated by multiplying a difference between the lightprojection timing of the scanning light L1 from the light projectingelement LD and the light reception timing of the photoelectricconversion element 22 having received the reflected light L2 reflectedby the object M by a known speed of light. The light projection timingis a predetermined period, and a production of this light projectiontiming and an angular speed of the motor 24 defines a space density ofoptical axes, namely an angle between optical axes. It is to be notedthat the light projection timing may be defined with the “time”, or maybe defined with the “direction” or the “space density (angle betweenoptical axes). The calculation of the distance based upon the lightprojection/reception timing may be repeatedly performed once everypredetermined minute time, or may, for example, be executed in everylight projection/reception in synchronous with the light projectiontiming.

Direction Calculating Device 52:

The direction calculating device 52 calculates in the light projectionand the light reception an irradiated direction (polarized direction) ofthe scanning light L1 polarized by the optical scanning device 14 towardthe measurement area and an incoming direction of the reflected light L2from the object M. However, since the travelling time of light to andfrom the object M inside the “measurement area” is relativelysufficiently small with respect to the angular speed of the motor 24 andthe irradiated direction and the incoming direction can thus be regardedas identical, either one of the irradiated direction and the incomingdirection may be calculated. This polarized direction of theprojected/received light L1, L2, namely the direction on the scanningsurface (scanning direction), can be obtained by calculating therotational angle of the optical scanning device 14 based upon theforegoing output from the rotary encoder 25. It is to be noted that inthe case of defining the light projection timing with the direction orthe space density (angle between optical axes), the polarized direction(scanning direction) is preferably set as the irradiated direction.Further, this direction is equivalent to an optical axis number.

Position Recognizing Device 53:

The position recognizing device 53 recognizes a position of the objectM. Namely, the position recognizing device 53 calculates the position ofthe object M based upon the polarized direction (scanning direction)calculated by the direction calculating device 52 at every lightprojection/reception timing and the distance to the object M calculatedby the distance calculating device 51 in this polarized direction, so asto recognize the position of this object M.

Discrimination Device 54:

The discrimination device 54 discriminates whether or not the object Mis present inside the previously set protection area A based upon theposition of the object M calculated by the position recognizing device53. In addition, the discrimination device 54 may be configured so as tosupply information indicating “present” when discriminating the presenceof the object M inside the protection area even just once (in oneperiod), or to supply information indicating “present” only afterdiscriminating the presence of the object M inside the protection areaover a plurality of periods.

The optical system of the optical scanning type photoelectric switch 1is sealed by a light transmitting cover 62 with a U-shaped lateral crosssection surrounding the front surface and both side surfaces of thelower half of the optical scanning type photoelectric switch 1, and thislight transmitting cover 62 forms a light projection window. FIG. 8illustrates a state where the light transmitting cover 62 has beendetached. The light transmitting cover 62 is attached through a sealingmember 64, and can be detached from the optical scanning typephotoelectric switch 1 by unscrewing a plurality of bolts 66 (FIG. 5).The light transmitting cover 62 of the light projection window is anoptical filter, and removes wavelength components other than laser lightemitted by the optical scanning type photoelectric switch 1. Althoughthe light transmitting cover 62 is made of an arbitrary material, here,it is made of an elastic transformable synthetic resin material.

As best seen from FIG. 7 as a sectional view of the apparatus body 60,the optical scanning device (scanning mirror) 14 is arranged at thefront end apart from the rear surface section at the bottom of theapparatus body 60, and thereby, the vertical first axis line Z as therotational axis line of the scanning mirror 14 is positioned as beingoffset relatively in front. On the other hand, the light transmittingcover 62 surrounds the front and both sides of the apparatus body 60,and both right and left ends of this light transmitting cover 62 extendto the rear surface of the optical scanning type photoelectric switch 1.Adopting such a configuration allows designing of the right and leftareas and the front area, except for a portion interfering with the rearsurface, of the optical scanning type photoelectric switch 1 as thescanning area (measurement area). The same applies to a case where thescanning mirror for light projection and the scanning mirror for lightreception, which mutually synchronously rotate, are arranged at the sameaxis as well as being arranged so as to face the same direction, asdescribed above as the modified example of the scanning mirror 14.

In this regard, as described above, the scanning range (measurementarea) of the optical scanning type photoelectric switch 1 is 270degrees, expanded to the rear from 180 degrees. The scanning range ofthe optical scanning type photoelectric switch 1 can be expanded to therear in this manner basically by combination of two configurations: (1)a configuration is adopted where, on the scanning surface 39 (FIG. 6A),a width of the rear surface of the optical scanning type photoelectricswitch 1 that interferes with the scanning surface 39 is restricted to arange of 90 degrees; and further, (2) the first axis line Z as therotational axis line of the scanning mirror 14 is spaced from the rearsurface of the optical scanning type photoelectric switch 1 and bothside surfaces, mutually in parallel, of the light transmitting cover 62with a U-shaped cross section are extended to the rear so that the wholearea of the side areas and the front area, except for the rear surface,of the optical scanning type photoelectric switch 1 are surrounded bythe light transmitting cover 62. In other words, the optical scanningtype photoelectric switch 1 is slim and has a small height as comparedwith a conventional article, has a volume about half that of theconventional article, and has a size to such an extent as to be able tobe easily placed on one's palm.

The shape of the light transmitting cover 62, namely a shape graduallyexpanded upward (FIGS. 5, 8), should also be noted. Further, as bestseen from FIG. 5, a bottom section 62 a of the light transmitting cover62 is configured of a vertical wall, and a portion gradually expandingoutward toward the top has an overhung shape. In the verticallyintermediate portion of this overhung-shape portion 62 b, the horizontalscanning surface 39 is set (FIG. 6). It should be noted that, as bestseen from FIG. 5, a portion in contact with the bottom of the lighttransmitting cover 62 is configured of a horizontal step section 70protruding outside. First and second optical elements 71, 72 arearranged with the light transmitting cover 62 sandwiched therebetween(FIG. 4), and the second optical element 72 located outside the lighttransmitting cover 62 is arranged in the horizontal step section 70. Inother words, the first optical element 71 is arranged inside the lighttransmitting cover 62, and this first optical element 71 is installeddownward (toward the second optical element 72). Namely, the first andsecond optical elements 71, 72 in pairs are positioned as mutuallyopposed, and a plurality of sets of the first and second opticalelements 71, 72 are provided on the periphery of the light transmittingcover 62 at appropriate spacings.

First and Second Optical Elements 71, 72:

The light transmitting cover 62 of the optical scanning typephotoelectric switch 1 serves as a filter for blocking visible light.Naturally, a material that allows the scanning light L1 and thereflected light L2 to pass therethrough has been selected. When thislight transmitting cover 62 is contaminated or deteriorates with time,its light transmittance decreases, causing a decrease in light amount ofthe reflected light L2 incident on the photoelectric conversion element22. Needless to say, this phenomenon is undesirable since it causesdeterioration in sensitivity for detecting a position of the object M.

Each set of the first and second optical elements 71, 72, which aremutually opposed with the light transmitting cover 62 sandwichedtherebetween, continuously monitor a contamination state of the lighttransmitting cover 62. Light emitted by the first optical element 71enters the second optical element 72 through the light transmittingcover 62, and an amount of this light received by the second opticalelement 72 is supplied to the control device 30.

Contamination Sensing Device 55:

By means of the amount of light received by the second optical element72, the contamination sensing device 55 verifies that the lighttransmitting cover 62 holds a predetermined transmittance. A decrease intransmittance due to deterioration with time in light transmitting cover62 constituting the light projection window, contamination thereof, orthe like, can be sensed based upon the amount of light received by thesecond optical element 72. Here, when the amount of light received bythe second optical element 72 is not larger than a predeterminedthreshold, the user may be notified by means of the liquid crystaldisplay section 34 or the LED indicator 38 that it is the time forreplacing the light transmitting cover 62. Further, the contaminationsensing device 55 constitutes a failure detecting device for detectingwhether or not the optical scanning type photoelectric switch 1 is outof order, namely a device for verifying whether or not the opticalscanning type photoelectric switch 1 is in such a safe state as to beable to perform an intended detection or the like, and if thecontamination sensing device 55 determines that the optical scanningtype photoelectric switch 1 is out of order, the user is alerted bymeans of the liquid crystal display section 34 or the LED indicator 38while an operation non-permitting signal is transmitted toward theexternal equipment through the signal generating device 56.

It is to be noted that, although the example was described where thefirst and second optical elements 71, 72 are arranged as mutuallyopposed with the light transmitting cover 62 sandwiched therebetween fordetecting contamination and deterioration of the light transmittingcover 62, for example, a reflection mirror may be arranged on thehorizontal step section 70 in place of the second optical element 72,light emitted by the first optical element 71 may be reflected by thereflection mirror, and the reflected light may be received by the secondoptical element 72 arranged adjacently to the first optical element 71.According to this example, the first and second optical elements 71, 72are mutually closely arranged inside the light transmitting cover 62.

Signal Generating Device 56:

The signal generating device 56 generates a safety signal based upon aresult of discrimination by the discrimination device 54. For example,on a predetermined mode, when a normal operation of the optical scanningtype photoelectric switch 1 is verified and the discrimination device 54determines that the object M is not present in the protection area A,the signal generating device 56 generates an ON signal (operationpermitting signal) as a safety output, and this safety output istransmitted toward the external equipment via the control device 30 andthe first connector 40 through the external cable 42, so that anoperation of the external equipment is allowed.

The failure sensing device 58 serves to verify that the optical scanningtype photoelectric switch 1 is in proper operation, and when the normaloperation cannot be verified, the optical scanning type photoelectricswitch 1 is regarded as being out of order.

Detection Sensitivity Holding/Adjusting Mechanism of Optical ScanningType Photoelectric Switch 1:

FIGS. 9 and 10 each show a state where the optical scanning means,namely the scanning mirror 14, faces the rear surface of the opticalscanning type photoelectric switch 1. Needless to say, in this state,detection by the optical scanning type photoelectric switch 1 isimpossible. In a rising column portion 60 a of the apparatus body 60,the two reflection surfaces, the first and second reflection surfaces73, 74, as reference objects are arranged at positions where thosereflection surfaces can face the scanning mirror 14 respectively on thelagging side and the leading side in the rotational direction of thescanning mirror 14, namely on the right and left, and these first andsecond reflection surfaces 73, 74 are arranged in the state of facingobliquely upward while being inclined by about 45 degrees. Further, asopposed to these first and second reflection surfaces 73, 74, a fixedmirror 75 inclined obliquely downward by about 45 degrees is arranged inthe column portion 60 a. That is, in the rising column portion 60 a ofthe apparatus body 60, the first and second reflection surfaces 73, 74are arranged in the state of facing obliquely upward at the positions towhich the scanning mirror 14 is opposed when turning backward, and thefixed mirror 75 is arranged in the state of facing obliquely downwardabove the first and second reflection surfaces 73, 74.

The first and second reflection surfaces 73, 74 as the reference objectsare made of materials with different reflection factors or have colorswith different reflection factors. As a specific example, the firstreflection surface 73 is made of a black material or colored black, andthe second reflection surface 74 is made of a white material or coloredwhite.

The laser pulse light L1 emitted by the light projecting element LD hitsthe scanning mirror 14 by means of the light projecting lens 10 and thefirst and second mirrors (reflection mirrors) 11, 12 for lightprojection, and the light is made by the scanning mirror 14 to becomelight that travels in a horizontal direction. When the scanning mirror14 faces forward or sideward, this laser pulse light L1 is guided to themeasurement area. Even when the scanning mirror 14 turns backward, inthe midst of its 360-degree turn, by emission of the laser pulse L1, thelaser pulse light L1 is first guided to the black first reflectionsurface 73 by the scanning mirror 14 facing backward, and subsequentlyguided to the white second reflection surface 74. This laser pulse lightL1 is reflected by the first and second reflection surfaces 73, 74facing obliquely upward and travels upward in a vertical direction (L3),and this reflected pulse light L3 is reflected by the fixed mirror 75arranged above the first and second reflection surfaces 73, 74. Withthis fixed mirror 75 arranged in a posture facing obliquely downward byabout 45 degrees, the reflected pulse light L3 reflected by the fixedmirror 75 returns to the scanning mirror 14, is reflected by thisscanning mirror 14 and travels upward, to be collected by thephotoelectric conversion element 22 through the light receiving lens 20and the received light reflection body 21. That is, the pulse light L3reflected by each of the first and second reflection surfaces 73, 74 isinputted into the photoelectric conversion element 22 as the lightreceiving element through the same elements 14, 20, 21 as in the case ofthe light L2 that is reflected by the object M in the warning area orthe protection area A.

In the rear of the scanning mirror 14, the first reflection surface 73(black) and the second reflection surface 74 (white) with differentreflection factors are provided adjacently on the lagging side and theleading side in the rotational direction (scanning direction) of thescanning mirror 14, and the fixed mirror 75 also fixed to the columnportion 60 a is provided, whereby the reflected pulse light L3 reflectedby each of the first reflection surface (black) 73 and the secondreflection surface (white) 74 is inputted into the photoelectricconversion element 22 as the light receiving element through the sameelements 14, 20, 21 as in the case of the light L2 reflected by theobject M in the warning area or the protection area A.

Incidentally, a light reception intensity at the time of irradiating thereference object with laser pulse light and receiving the reflectedpulse light can be expressed by the following formula:

Light reception intensity={Light projection intensity×opticalcharacteristic of light projection path×reflection factor of referenceobject÷(distance to reference object)²×optical characteristic of lightreception path×light reception gain}  (Formula 1)

Further, in the case of scanning with laser light, the detectionsensitivity can be expressed by the following formula without relyingupon the reflection factor of the object and the distance to the object:

Detection sensitivity={Light projection intensity×optical characteristicof light projection path×optical characteristic of light receptionpath×light reception gain}  (Formula 2)

According to the above Formulas 1 and 2, when the reflection factor ofthe reference object and the distance to the reference object areconstant, following Formula 3 is established:

Detection sensitivity={light reception intensity×fixed value}  (Formula3)

Since inclusion of the reference object inside the optical scanning typephotoelectric switch 1 using laser light facilitates to make thereflection factor of the reference object and the distance to thereference object constant, holding the light reception sensitivity,obtained in projecting light to the reference object, constant can makethe detection sensitivity remain constant. From this viewpoint, forexample in factory shipment of the optical scanning type photoelectricswitch 1, a light reception intensity of the optical scanning typephotoelectric switch 1 is measured when its detection sensitivity is inan optimal state, which is then stored into a storage element of theoptical scanning type photoelectric switch 1, and when the opticalscanning type photoelectric switch 1 is in operation, a light projectionintensity and/or a light reception gain is adjusted such that a lightreception intensity becomes the light reception intensity stored in thestorage element, whereby it is possible to hold the detectionsensitivity of the optical scanning type photoelectric switch 1 in theoptimal state.

FIG. 11 is a view where the first and second reflection surfaces 73, 74have been extracted, and an arrow indicates the rotational direction,namely the scanning direction, of the scanning mirror 14. FIG. 12illustrates a state where laser pulse light is hitting the first andsecond reflection surfaces 73, 74 in a time sequence.

It is assumed that the light reception intensity is “100” when the laserpulse light is hitting the black reflection surface 73 as one of thereference objects (FIG. 12(I)), and the light reception intensity is“600” when the laser pulse light is hitting the white reflection surface74 as the other of the reference objects (FIG. 12(II)). Although theexpressions of “black” and “white” are used here with respect to thefirst and second reflection surfaces 73, 74, those should be understoodas expressions for the sake of convenience. “Black” means a lowreflection factor with respect to a wavelength of laser light as a lightprojecting source, and “white” means a high reflection factor withrespect to the wavelength of the laser light as the light projectingsource. Further, since adopting a surface with a sufficiently lowreflection factor as the black reflection surface 73 makes a reflectionfactor of a material constituting contamination equivalent or notsmaller than the reflection factor of the black reflection surface 73,the black reflection surface 73 tends to have an increased reflectionfactor when contaminated. On the other hand, adopting a surface with asufficiently high reflection factor as the white reflection surface 74makes the second reflection surface 74 tend to have a decreasedreflection factor when contaminated.

In the case of adjusting the light projection intensity and/or the lightreception gain so as to hold the light reception intensity at “600” onthe white second reflection surface 74, when the white second reflectionsurface 74 is contaminated and its reflection factor thus decreases,adjustment of the light projection intensity and/or the light receptiongain is executed so as to hold the light reception intensity at “600” onthe second reflection surface 74. In this case, the light receptionintensity on the first reflection surface 73 increases due to anincrease in light reception intensity with the reflection factor and thedistance remaining constant. In order to cope with this phenomenon, thelight reception intensities on the first and second reflection surfaces73, 74 are continuously monitored, an allowable range (e.g. 80 to 120)is set to a value of the light reception intensity on the black firstreflection surface 73, and when the light reception intensity on theblack first reflection surface 73 exceeds the allowable range, it isregarded that contamination has been generated on the white secondreflection surface 74. When contamination is generated on the whitesecond reflection surface 74, appropriate sensitivity adjustment becomesimpossible, to prevent accurate monitoring of the protection area A, andhence the optical scanning type photoelectric switch 1 brings the safetyoutput into an OFF state, to halt power of a danger source. Further, theoptical scanning type photoelectric switch 1 may be configured so as togive the user an indication that the safety cannot be verified (thesafety output is in the OFF state) and also an indication of reasons forthe safety being not verifiable (error contents) by means of the liquidcrystal display section 34 or the LED indicator 38. Moreover, theoptical scanning type photoelectric switch 1 may be configured so as tooutput occurrence of an error to the external equipment by means of anon-safety output signal other than the safety output, or transmit anerror factor and the safety output being in the OFF state to an externalpersonal computer PC through a communication cable 80.

Similarly, when the reflection factor increases due to contamination onthe black first reflection surface 73, the reflected light on the firstreflection surface 73 is intensified, and a phenomenon of an increase inlight reception intensity on the black first reflection surface 73 thusappears. Also at this time, when the light reception intensity exceedsthe allowable range on the black first reflection surface 73, it isregarded that contamination has been generated on both or one of theblack first reflection surface 73 and the white second reflectionsurface 74, and the optical scanning type photoelectric switch 1 bringsthe safety output into an OFF state, to halt power of a danger source.Further, the optical scanning type photoelectric switch 1 may beconfigured so as to give the user an indication that the safety cannotbe verified (the safety output is in the OFF state) and also anindication of reasons for the safety being not verifiable (errorcontents) by means of the liquid crystal display section 34 and/or theLED indicator 38.

By building the first and second reflection surfaces 73, 74 withdifferent reflection factors as the reference objects into the opticalscanning type photoelectric switch 1 and sharing the optical system ofthe optical scanning type photoelectric switch 1, it is possible tocontinuously monitor the light reception intensity and adjust the lightprojection intensity and/or the light reception gain, so as to make thelight reception intensity constant. It is therefore not necessary indesigning the optical scanning type photoelectric switch 1 to expectaged deterioration and variations in ambient temperature in use, regardthe variations as being in the allowable range, and define a largemargin as a specification. Further, it is possible to establish apredetermined detection sensitivity by making the margin small andinitially setting the light projection intensity and/or the lightreception gain high, thereby to facilitate reduction in size of theoptical scanning type photoelectric switch 1. Additionally, since it hasbeen configured such that contamination of the adjustment device made upof the first and second reflection surfaces 73, 74 is detected as afailure, it is possible to make a margin of a detection performance forensuring the safety small, so as to provide the optical scanning typephotoelectric switch 1 capable of performing a long-range detection ontop of ensuring the safety despite its small size.

Setting of Protection Area A:

The setting of the protection area A by the optical scanning typephotoelectric switch 1 is performed using the personal computer PC,aside from whether or not it is configured so as to allow only theoptical scanning type photoelectric switch 1 to make a simple setting,as shown in FIG. 13. The personal computer PC and the optical scanningtype photoelectric switch 1 are mutually connected through thecommunication cable 80. As known, the personal computer PC has a display81 and an input operating section 82.

In the personal computer PC, an application program for previouslysetting the protection area A is installed, and using this program, theprotection area A of the optical scanning type photoelectric switch 1can be edited.

FIG. 14 is a block diagram representing a configuration of the personalcomputer PC as a protection area editing system. The personal computerPC is provided by the application program with functions of anadded/deleted area designating section 84, a mismatch area extractingsection 86, a set area updating section 87, a set area storing section88, a set area transferring section 89, and a dialog displaying section90.

The set area storing section 88 is configured of a memory that storesset area information for designating the protection area A to theoptical scanning type photoelectric switch 1. The added/deleted areadesignating section 84 performs an operation of designating anadditional area, a deleting area and a line segment based upon an inputsignal from the input operating section 82.

In the case of adding an area to the protection area A already set inthe optical scanning type photoelectric switch 1, an area designated bythe user is designated as the added area. Further in the case ofdeleting an area from the already set protection area A, an areadesignated by the user is designated as a deleted area.

The mismatch area extracting section 86 performs an operation ofautomatically extracting an area, located between the protection area Aand the added area as seen from the optical scanning type photoelectricswitch 1, as a mismatch area. Namely, when there is an area, whichcannot be designated as a sensed area, between the protection area A andthe area designated as the added area as seen from the optical scanningtype photoelectric switch 1, an operation of extracting the above areaas the mismatch area is performed.

In the mismatch area extracting section 86, when a line segment isdesignated during area-addition, an area located between the protectionarea A and the line segment as seen from the optical scanning typephotoelectric switch 1 is extracted as the mismatch area. Here, themismatch area extracted during the area-addition is referred to as aninterpolation area.

Further, the mismatch area extracting section 86 performs an operationof automatically extracting an area, which is located in the rear of thedeleted area as well as being in the protection area A as seen from theoptical scanning type photoelectric switch 1, as the mismatch area.Namely, when there is an area designated as the protection area A in therear of the area designated as the deleted area as seen from the opticalscanning type photoelectric switch 1, an operation of extracting theabove area as the mismatch area is performed.

In the mismatch area extracting section 86, when a line segment isdesignated during area-deletion, an area located in the rear of the linesegment as well as being inside the protection area A as seen from theoptical scanning type photoelectric switch 1 is extracted as themismatch area. Here, the mismatch area extracted during thearea-deletion is referred to as a “shadow area”.

The area displaying section 85 controls the display 81, and performs anoperation of visually identifiably displaying the protection area A, theadded area, the deleted area, and the mismatch areas (the interpolationarea and the shadow area) based upon set area information stored in theset area storing section 88. Namely, in the case of adding an area tothe already set protection area A, the interpolation area isidentifiably displayed with respect to the protection area A and theadded area, and at that time, the interpolation area is identifiablydisplayed with respect to the protection area A before being addition ofthe added area and the interpolation area on the display 81.

Further, in the case of deleting an area from the already set protectionarea A, the shadow area is identifiably displayed with respect to theprotection area A and the deleted area, and at that time, the shadowarea is identifiably displayed with respect to the protection area Abefore deletion of the deleted area and the shadow area on the display81.

The set area updating section 87 performs an operation of updating theprotection area A stored in the set area storing section 88 based uponan input signal from the input operating section 82. Namely, in the caseof adding an area to the already set protection area A, the protectionarea A added with the added area and the interpolation area is updatedas a new protection area A.

When the line segment is designated during the area-addition, the setarea information is updated such that the protection area A added withthe interpolation area becomes a new protection area A.

Further, in the case of deleting an area from the already set protectionarea A, the set area information is updated so as to set the protectionarea A with the deleted area and the shadow area deleted therefrom as anew protection area A.

When the line segment is designated during the area-deletion, the setarea information is updated such that the protection area A with theshadow area deleted therefrom becomes a new protection area A.

The dialog displaying section 90 controls the display 81, and displays averification dialog based upon an input signal from the input operatingsection 82. Namely, in the case of adding an area to the already setprotection area A, an inquiry dialog 93 for inquiring about whether ornot to add the added area and the interpolation area to the protectionarea A is displayed as a verification dialog on the display 81.

Similarly, in the case of deleting an area from the already setprotection area A, an inquiry dialog 93 for inquiring about whether ornot to delete the deleted area and the shadow area from the protectionarea A is displayed as a verification dialog on the display 81.

In the set area updating section 87, based upon an input signal from theinput operating section 82 after display of the above inquiry dialog,namely an operational input of change permission by the user, the setarea information in the set area storing section 88 is updated.

The set area transferring section 89 performs an operation oftransferring information of the protection area A stored in the set areastoring section 88 to the optical scanning type photoelectric switch 1.Further, such a configuration is adopted to the set area transferringsection 89 where, after transferring of the information of theprotection area A to the optical scanning type photoelectric switch 1, areturn of the information of the protection area A is accepted from theoptical scanning type photoelectric switch 1 before the transferredprotection area A is reflected to the optical scanning typephotoelectric switch 1, so that the returned information can be used forthe operation of verifying the protection area A performed by the user.Reflection of the transferred protection area A to the optical scanningtype photoelectric switch 1 is executed following the protection area Averifying operation by the user.

FIG. 15 shows a displayed area setting screen on the display 81 of thepersonal computer PC. This area setting screen is an input screen foruse in newly designating the protection area A or editing the alreadyset protection area A.

In the area setting screen displayed on the display 81, a maximumdetection area (measurement area) is displayed with respect to anorthogonal coordinate with a symbol S showing the optical scanning typephotoelectric switch 1 at the center, and grid lines G1 in parallel withan abscissa axis are arranged at a spacing of 500 mm, while grid linesG2 in parallel with an ordinate axis are arranged at a spacing of 500mm.

In the rear of the symbol S, an upper limit of a distance that can besensed changes based upon an emission angle of scanning laser light, anda range H of an angle that can be sensed is not smaller than −45 degreesand not smaller than +225 degrees. An area in a range other than thisangle range H is a blind range, and cannot be designated as theprotection area A.

FIG. 16 shows a screen in the case of adding an area 92 to a rectangularprotection area A. Other than the rectangular shape, the protection areaA can be designated to have a polygonal shape, a circular shape with thesymbol S showing the optical scanning type photoelectric switch 1 at thecenter, a sectoral shape, or the like, and an closed area with a line,which was drawn while a mouse pointer was moved, taken as a border canalso be designated as the protection area A.

Assuming that the protection area A is designated in the area settingscreen displayed on the display 81, for example when a decision key isoperated by the user, the protection area A is decided, and an area,which is needed adding at the minimum for making this protection area Aan object to be sensed, is automatically extracted as the interpolationarea 92. Namely, as seen from the optical scanning type photoelectricswitch 1, the interpolation area 92 is extracted as an area notdesignated as the object to be sensed between the region designated asthe protection area A and the optical scanning type photoelectric switch1. A verification dialog 93 for inquiring about whether or not theinterpolation area 92 may be added to the protection area A isdisplayed, and when the addition is permitted by the user, an areaobtained by adding the interpolation area 92 to the protection area A,set by the user, is set as a new protection area A, and information isupdated based upon this new protection area A.

FIG. 17 shows an example of deleting part of the protection area A. Anarea deleted from the protection area A can be arbitrarily designated,and reference numeral 94 denotes a deleted area designated by the user.Other than the rectangular shape, the deleted area can be designated tohave a polygonal shape, a circular shape with the optical scanning typephotoelectric switch 1 at the center, a sectoral shape, or the like.Further, a closed area with a curved line taken as a border can also bedesignated, the curved line having been drawn while the mouse pointer onthe screen was moved.

An area 94 included in the protection area A is designated as thedeleted area, and for example when the decision key is operated by theuser, the deleted area 94 is decided as the area to be deleted. Indeleting this deleted area 94 from the protection area A, the deletedarea 94 is made a non-detected area so that an area to be deleted at theminimum is automatically extracted as a shadow area 95. Namely, as seenfrom the optical scanning type photoelectric switch 1, an area to besensed in the rear of the area 94 designated as the deleted area isextracted as the shadow area 95.

When the shadow area 95 is automatically extracted, a verificationdialog 93 for inquiring about whether or not the shadow area 95 may bedeleted from the protection area A. When a change in the protection areaA including the shadow area 95 is then permitted by the user, an areaobtained by deleting the deleted area 94 and the shadow area 95 from theprotection area A is set as a new protection area A, and zoneinformation of this new protection area A is updated. FIG. 17C shows thenew protection area A.

Muting Function and Switching of Muting Area:

The optical scanning type photoelectric switch 1 has a muting functionwhich sets a single or a plurality of muting areas in part or the wholeof the protection area A and invalidating a previously set sensingfunction in the muting area when a predetermined condition isestablished. The case of setting part of the protection area A as themuting area is referred to as “partial mute”, and the case of settingthe whole of the protection area A as the muting area is referred to as“full mute”. The optical scanning type photoelectric switch 1 is capableof making a switch to a different muting area by other sensing device ortimings. In the following description, a switching control on the mutingarea is described centering on the partial mute, but one muting area outof the plurality of muting areas may be set as the whole of theprotection area A (“full mute”).

Settings of the muting function and the muting area can be made usingthe personal computer PC as in the foregoing setting of the protectionarea A, and the application program used in setting of the protectionarea A has been added with a function concerning muting.

FIG. 18 exemplifies the case of setting a sectoral protection area A bymeans of the application program installed in the personal computer PC.This method for setting the protection area A is as in the foregoingdescription with reference to FIGS. 13 to 17, and an inquiry dialog 93about whether or not to set the designated protection area A isdisplayed on the display 81 as the verification dialog. The designatedprotection area A is set by permission made by the user using thisinquiry dialog 93.

FIG. 19 shows a display screen for setting the muting area by means ofthe setting function concerning muting in the application program usedin setting of the protection area A. Reference numeral 97 denotes anarea designated by the user as the muting area. It should be noted that,as understood from FIG. 19, the user has designated a rectangular areaacross an area apart from the optical scanning type photoelectric switchsymbol S out of the protection area A. In this example of FIG. 19, thisdesignated area 97 at least includes the end of the protection area Aapart from the optical scanning type photoelectric switch symbol S outof the protection area A. When the end apart from the symbol S is notincluded, namely when the area is designated in the protection area A ina vertically midway portion in FIG. 19, a later-described shadow area isautomatically extracted, and this shadow area is displayed. The area 97designated by the user is displayed as superimposed on the protectionarea A, the protection area A and the area 97 designated by the user aredisplayed with different colors, and the portion where the area 97designated by the user and the protection area A overlap is displayedwith a third color as a mixed color of the first color of the protectionarea A and the second color of the area 97 designated by the user.

On the display 81 of the personal computer PC, an inquiry dialog 93 forinquiring about whether the designated area 97 is correct is displayedas the verification dialog, and by the user's permission, a muting area98 is set in an area where the designated area 97 and the protectionarea A overlap (FIG. 20). In a state where the muting area is set, aportion protruding from the protection area A out of the forgoing area97 designated by the user (FIG. 18) has been deleted, and the protectionarea A and the muting area 98 set inside this protection area A aredisplayed with different colors. A plurality of muting areas 98 can beset in the same protection area A in the same manner, and a condition ofactivating the muting function, the time when the muting function isexecuted, and the like can be set using a muting function setting screenshown in FIG. 21 with respect to each of the muting areas 98. It is tobe noted that a setting procedure for the muting area 98 is performedsimilarly to the procedure for deleting part of the protection area A.That is, when an area to be muted is designated, a shadow area which isto be added at the minimum as the muting area 98 (an area in the rear ofthe designated area as seen from the optical scanning type photoelectricswitch 1) is automatically extracted, a verification dialog forinquiring whether or not the extracted area may be added as the mutingarea 98, and setting of the muting area 98 and updating thereof areexecuted in accordance with a permission designation.

For example when a plurality of muting areas 98 are set in theprotection area A, by means of the setting screen of FIG. 21, it ispossible to set the timing for starting muting, the timing for resettingmuting, the time when the muting state is allowed, a time differenceamong a plurality of timing signals, and the like with respect to eachof the muting areas 98.

A specific example is described using a conveyance system for a work Wwith reference to FIG. 22. FIG. 22 shows a state of a conveyanceapparatus (e.g. belt conveyer) V seen from its side, the conveyanceapparatus V is provided with a gate 100, the optical scanning typephotoelectric switch 1 is arranged at the center of a top lateral bar ofthe gate 100, and the optical scanning type photoelectric switch 1 isarranged such that the scanning surface 39 (FIG. 6) expands downwardwhile agreeing with a vertical surface surrounded by the gate 100.Namely, at an opening of the gate 100, a light curtain (detection plane)is formed by the optical scanning type photoelectric switch 1 arrangedat the center top of the gate 100.

In the conveyance apparatus V, mute sensors 101 to 104 constituted ofphotoelectric sensors or the like are arranged so as to satisfypredetermined conditions. Here, from the upstream side toward thedownstream side in accordance with a conveyance direction of theconveyance apparatus V, the first and second mute sensors 101, 102 arearranged on the near side, namely on the upstream side of the gate 100,and the third and fourth mute sensors 103, 104 are arranged on thedownstream side of the gate 100. The downstream of the gate 100 is ano-entry area. The first to fourth mute sensors 101 to 104 arerespectively connected to the optical scanning type photoelectric switch1 through cables outside the figure. As a modified example, outputsignals of the first and third mute sensors 101, 103 may be wired OR andthe output signals of the second and fourth mute sensors 102, 104 may bewired OR, to be connected to the optical scanning type photoelectricswitch 1. An output signal line of the first and third mute sensors 101,103 transmits to the optical scanning type photoelectric switch 1information that at least either one of the first and third mute sensors101, 103 has detected the work W. An output signal line of the secondand fourth mute sensors 102, 104 transmits to the optical scanning typephotoelectric switch 1 information that at least either one of thesecond and fourth mute sensors 102, 104 has detected the work W. In thecase of the mute sensor that is turned ON by detection of the work W,the output signal of the mute sensor is short-circuited so that thesignal can be made a wired OR signal. Connecting the wired OR outputsignal lines to the optical scanning type photoelectric switch 1 canreduce the number of input signal lines of the optical scanning typephotoelectric switch 1 required for the muting function from four totwo. In the following, a description is given taking the case of thewired OR as an example.

An interval between the first mute sensor 101 and the second mute sensor102 is D1. An interval between the second mute sensor 102 and the fourthmute sensor 104 is D2. An interval between the first mute sensor 101 andthe third mute sensor 103 is D3. Further, a moving speed of the work W,namely a conveyance speed of the conveyance apparatus V, is V1. Theforegoing conditions for setting the first to fourth mute sensors 101 to104 are as follows:

Ta<{T=D1/V1}<Tb  Condition (1)

D2<Lw  Condition (2)

D3<Lw  Condition (3)

Here, Ta and Tb are previously set fixed values, and Lw is alongitudinal length of the work W.

The condition (1) requires that the time difference from transition ofthe first mute sensor 101 to a detecting state by movement of the work Wto transition of the second mute sensor 102 to the detecting state(T=D1/V1) is within a predetermined range. The condition (2) is acondition for preventing the second mute sensor 102 from coming into anon-detecting state before transition of the fourth mute sensor 104 tothe detecting state. The condition (3) is a condition for preventing thefirst mute sensor 101 from coming into the non-detecting state beforetransition of the third mute sensor 103 to the detecting state.

By arranging the first and second mute sensors 101, 102 so as to satisfythe condition (1), it is possible to discriminate entry of the work Wand entry of an entry object other than the work W from the timedifference from the transition of the first mute sensor 101 to thedetecting state to the transition of the second mute sensor 102 to thedetecting state.

By arranging the first to fourth mute sensors 101 to 104 so as tosatisfy the condition (2) and the condition (3), it is possible todiscriminate entry of the work W and entry of the entry object otherthan the work W under the condition that the conveyance apparatus V isconveyed at constant speed, through use of different distances in theconveyance direction.

FIG. 23 is a functional block diagram of the optical scanning typephotoelectric switch 1 connected to the first to fourth mute sensors 101to 104. In FIG. 23, reference symbol Tr denotes an external inputaccepting terminal that accepts an external input from each of the firstto fourth mute sensors 101 to 104. The optical scanning typephotoelectric switch 1 is configured of a mute start determining section106, a muting state signal generating section 108 and a mute completiondetermining section 110. When an object enters the protection area A,transition is made from the non-detecting state to the detecting state,and an OFF signal (operation non-permitting signal) is outputted fromthe safety output signal controlling section 111.

Based upon a first entry determining section 112 for determining entryof an object (object M) into the protection area A including the mutingarea, an external input signal as an external input accepted from thefirst and third mute sensors 101, 103 through the terminal Tr, and anexternal input signal as an external input from the second and fourthmute sensors 102, 104 through the terminal Tr, the mute startdetermining section 106 determines establishment of the followingconditions and outputs the establishment of muting starting conditionsto the muting state signal generating section 108. The muting startingconditions are that the first entry determining section 112 fordetermining entry into the protection area A including the muting areais in the non-sensing state, and that a time difference T1 from the timeof transition of the first and third mute sensors 101, 103 from thenon-sensing state to the sensing state to the time of transition of thesecond and fourth mute sensors 102, 104 from the non-sensing state tothe sensing state is within a predetermined range (range satisfyingTa<T1<Tb).

Based upon a result of determination by the mute start determiningsection 106 and a result of determination by the mute completiondetermining section 110, the muting state signal generating section 108performs an operation of generating a muting state signal with respectto the safety output signal controlling section 111 and the mutecompletion determining section 110.

Based upon a second entry determining section 114 for determining entryof the object (object M) into the protection area A excluding the mutingarea, input signals from the first and third mute sensors 101, 103,input signals from the second and fourth mute sensors 102, 104, and themuting state signal outputted by the muting state signal generatingsection 108, the mute completion determining section 110 determinesestablishment of the following conditions, and outputs establishment ofthe muting completion condition to the muting state signal generatingsection 108. The muting completion condition is that the second entrydetermining section 114 for determining entry into the protection area Aexcluding the muting area transits from the non-sensing state to thesensing state, or both the first and third mute sensors 101, 103 transitto the non-sensing state, or both the second and fourth mute sensors102, 104 transit to the non-sensing state, or a muting-state signaloutputted from the muting state signal generating section 108 is in themuting state beyond predetermined time Tc. In addition, a signal isinputted into the first and second entry determining sections 112, 114from a distance measuring section 116 for measuring a distance to theobject (object M).

Based upon results of determination by the mute start determiningsection 106 and the mute completion determining section 110, the mutingstate signal generating section 108 performs an operation of generatinga muting state signal for designating muting to the safety output signalcontrolling section 111.

A safety output signal outputted from the safety output signalcontrolling section 111 is used as a control signal for halting aprocessing machine inside the no-entry area on the downstream of thegate 100. This safety output signal controlling section 111 controls asafety output signal based upon a result of determination by the firstentry determining section 112 for determining entry into the protectionarea A including the muting area, a result of determination by thesecond entry determining section 114 for determining entry into theprotection area A excluding the muting, and a muting state signaloutputted by the muting state signal generating section 108. Morespecifically, in the case of the muting state signal being non-muting,the safety output signal controlling section 111 controls the safetyoutput to be OFF when the result of determination about entry into theprotection area A by the first entry determining section 112 is thesensing state, and the safety output signal controlling section 111controls the safety output to be ON when the result of determination isthe non-sensing state. On the other hand, in the case of the mutingstate signal being muting, the safety output signal controlling section111 controls the safety output to be OFF when the result ofdetermination about entry into the protection area A by the second entrydetermining section 114 is the sensing state, and the safety outputsignal controlling section 111 controls the safety output to be ON whenthe result of determination is the non-sensing state.

FIGS. 24 and 25 show examples of operations concerning conveyance of thework W by the conveyance apparatus V of FIG. 22, and FIGS. 24A to 24Cand FIGS. 25D and 25E are time series. When the object M enters theprotection area A of the optical scanning type photoelectric switch 1installed on the gate 100 at a time point (FIG. 24A) when the work Wdoes not interfere with the first mute sensor 101, an OFF signal(operation non-permitting signal) from the optical scanning typephotoelectric switch 1.

FIG. 24B shows a case where the front end of the work W is locatedbetween the first mute sensor 101 and the second mute sensor 102, andthe work W is interrupting light emitted from the light projectingsection of the first mute sensor 101. In this case, only the first mutesensor 101 is in the detecting state.

FIG. 24C shows a case where the front end of the work W interferes withthe second mute sensor 102, and the work W is interrupting light emittedfrom the respective light projecting sections of both the first andsecond mute sensors 101, 102. In this case, both the first and secondmute sensors 101, 102 are in the detecting state, and by transition ofthe first and second mute sensors 101, 102 to the detecting state inthis order, the muting function is executed in the muting area 98 in theprotection area A. Therefore, even when the work W passes through themuting area 98 in the protection area A of the optical scanning typephotoelectric switch 1 at the gate 100, an warning signal is notoutputted.

FIG. 25D is in a state where the rear end of the work W interferes withthe muting area 98 of the optical scanning type photoelectric switch 1,and the work W also interferes with the third mute sensor 103 on thedownstream of the gate 100. In this case, the muting state ismaintained.

FIG. 25E is in a state where the rear end of the work W interferes withthe fourth mute sensor 104. By transition of the third mute sensor 103to the non-detecting state, the muting area 98 of the optical scanningtype photoelectric switch 1 is reset, and immediately upon entry of theobject M into the protection area A of the optical scanning typephotoelectric switch 1, an warning signal is outputted.

FIG. 26 is a time chart for the operations described in FIGS. 24 and 25.Each of the first to fourth mute sensors 101 to 104 is on a low level(OFF state) in the non-detecting state, and outputs a signal on a highlevel (ON state) in the detecting state.

It is to be noted that in the time chart of FIG. 26, “YES” concerningthe optical scanning type photoelectric switch 1 means that there isentry of the object M into the protection area A, and “NO” means thatthere is no entry of the object M into the protection area A.

With the movement of the work W, the first to fourth mute sensors 101 to104 sequentially transfer to the detecting state. When the timedifference T1 from transition of the first mute sensor 101 to thedetecting state to transition of the second mute sensor 102 to detectingstate is within a predetermined range, a muting signal is switched tothe high level in synchronous with the rise of an output signal of thesecond mute sensor 102, and muting starts in the muting area 98 of theoptical scanning type photoelectric switch 1. Therefore, during thismuting operation, the muting area 98 in the protection area A of theoptical scanning type photoelectric switch 1 is practically an invalidarea.

When elapsed time T2 from the start of the muting state becomes notshorter than the predetermined time Tc, and when the optical scanningtype photoelectric switch 1 senses entry of the object (object M) intothe protection area A excluding the muting area, the muting is forciblyterminated. When setting the predetermined time Tc, the user may set anupper limit value such as five minutes. It is to be noted that, althoughthe description was given taking the example of the photoelectricsensors as the first to fourth mute sensors 101 to 104, a radio acousticwave sensor, an ultrasonic sensor, or a contact type sensor may beemployed as the mute sensor.

Further, when works W with different heights are conveyed with theconveyance apparatus V in conformity with a predetermined rule, thetiming at which the work W passes through the gate 100 may be detectedby a sensor arranged on the upstream side of the gate 100, and basedupon a timing signal from this sensor, the muting area 98 may beswitched to one in agreement with the height of the work W.

FIGS. 27 to 29 are views for explaining examples of the case of settinga plurality of muting areas 98 respectively corresponding to works Wwith different heights and widths.

Here, when the work W is exemplarily assumed as a car, and a first typecar W1 has a relatively large height and a relatively small width. Asopposed to this, a second type car W2 has a relatively small height anda relatively large width. Referring to FIGS. 27 to 29, the left side outof both sides with the gate 100 placed therebetween is the non-entryarea, the optical scanning type photoelectric switch 1 is arranged atthe central portion of the top lateral bar of the gate 100, and thescanning surface 39 of this optical scanning type photoelectric switch 1is set along a vertical surface surrounded by the gate 100, whereby alight curtain is formed at the opening of the gate 100 by the opticalscanning type photoelectric switch 1.

Each of arrows starting from the optical scanning type photoelectricswitch 1 exemplarily shows an optical axis of the optical scanning typephotoelectric switch 1. In FIG. 28, a first muting area 98(1) in theshape of a relatively low trapezoid is set when the second type car W2passes through the gate 100, and a second muting area 98(2) in the shapeof a relatively high trapezoid is set when the first type car W1 throughthe gate 100. When the order of passage of the types of the car Wthrough the gate 100 is previously decided, the muting area 98corresponding to the car types is set in accordance with this order.

FIGS. 30 to 32 show examples where, in the case of conveying differentkinds of works W, when the height of the work W is defined by detectionthereof with the sensors 121 to 123 and the type of the work W isdefined based upon this height, a plurality of muting areas 98 matchingrespective outer edges of the different kinds of works W are set, so asto set the muting area 98 corresponding to each work W.

Referring to FIG. 30, an example of control is shown where the opticalscanning type photoelectric switch 1 is arranged in a verticallydownward direction at the gate 100, and a reflex light curtain is formedat the opening of the gate 100 by optical axes of this optical scanningtype photoelectric switch 1. On its rising column 100 a, alow-positioned sensor 121, a middle-positioned sensor 122 and ahigh-positioned sensor 123 are arranged in low, middle and highpositions as vertically spaced thereamong. An example of control iswhere, before the work W enters the gate 100, namely before the work Wpasses through a light curtain formed by optical axes of the opticalscanning type photoelectric switch 1, the height of the work W isdetermined by combination of ON/OFF of the low-positioned,middle-positioned and high-positioned sensors 121 to 123 and the type ofthe work W is determined based upon this height, to switch the mutingareas 98(1) to 98(4) corresponding to the respective outer edges of theworks W.

FIG. 31A shows a case where light enters each of all the sensors 121 to123 arranged at the positions with different heights, which are the low,middle and high positions. In this case, the work W is regarded as onehaving a height to such an extent as not to interfere with thelow-positioned sensor 121, and hence a first muting area 98 (low) whichis relatively low or a first muting area 98 (low) in which the mutingarea is practically not present is set.

FIG. 31B shows a case where, out of the sensors 121 to 123 arranged atthe positions with different heights, which are the low, middle and highpositions, the low-positioned sensor 121 interferes with the work W andlight is interrupted. In this case, the work W is regarded as one beinghigher than the arranged height of the low-positioned sensor 121 butlower than the arranged height of the middle-positioned sensor 122, andhence a second muting area 98 (middle) with a moderate height is set.

FIG. 32C shows a case where, out of the sensors 121 to 123 arranged atthe positions with different heights, which are the low, middle and highpositions, the low-positioned sensor 121 and the middle-positionedsensor 122 interfere with the work W and light is interrupted. In thiscase, the work W is one regarded as being higher than the arrangedheight of the middle-positioned sensor 122 but lower than the arrangedheight of the high-positioned sensor 123, and hence a third muting area98 (high) which is relatively high is set.

FIG. 32D shows a case where light to each of all the sensors 121 to 123at the low to high positions is interrupted. In this case, the work W isregarded as one being so high as to interfere with the high-positionedsensor 123, and hence a fourth muting area 98 (ultra-high) with thegreatest height is set. This fourth muting area 98 (ultra-high) may bethe whole of the protection area A (“full mute”).

As thus described, a plurality of arbitrary muting areas 98 are preparedin the protection area A of the optical scanning type photoelectricswitch 1, a suitable muting area 98 is set at a required timing for arequired period of time, and when another muting area 98 is suitable,the muting area may be switched to this another muting area 98.

It is to be noted that, once an output of each of the low-positioned,middle-positioned and high-positioned sensors 121 to 123 comes into anON state (work W sensing state=light interrupted state), transition tothe OFF state is not immediately made even when light then enters, butthe change to the OFF state is made after light continues to enter for apreviously set predetermined period. This predetermined period is set bythe user such that the output of each of the low-positioned,middle-positioned and high-positioned sensors 121 to 123 is turned OFFafter the work W has completely passed through the light curtain formedby optical axes of the optical scanning type photoelectric switch 1.

In the example explained with reference to FIGS. 30 to 32, the mutingarea 98 is provided in the protection area A, while a plurality of areasare prepared as the muting areas 98 for switching of the muting area 98as appropriate. As a modified example of this, for example, an area withthe muting area 98 (low) of FIG. 31A removed therefrom may be set as theprotection area A, and this protection area A may be added with themuting area 98 (low). Naturally, an area with the muting area 98(middle) of FIG. 31B removed therefrom may be set as the protection areaA, and this protection area A may be added with the muting area 98(middle). Also in the case of FIG. 32C, similarly, an area with themuting area 98 (high) of FIG. 32C removed therefrom may be set as theprotection area A, and this protection area A may be added with themuting area 98 (high). Also in the case of FIG. 32D, similarly, an areawith the muting area 98 (ultra-high) of FIG. 32D removed therefrom maybe set as the protection area A, and this protection area A may be addedwith the muting area 98 (ultra-high).

Further, when light enters each of all the sensors 121 to 123 arrangedat the positions with different heights, which are the low, middle andhigh positions, the protection area A (added with the first muting area98 (low)), which was described in relation with FIG. 31A, may be set,and when the low-positioned sensor 121 interferes with the work W andlight is interrupted, the protection area A may be switched to theprotection area A (added with the second muting area 98 (middle)), whichwas described in relation with FIG. 31B, and then set. Further, when thelow-positioned sensor 121 and the middle-positioned sensor 122 interferewith the work W and light is interrupted, the protection area A may beswitched to the protection area A (added with the third muting area 98(high)) and then set, and when light to each of all the sensors 121 to123 at low to high positions is interrupted, the protection area A maybe switched to the protection area A (added with the fourth muting area98 (ultra-high)) and then set.

Protection Area Switching Control:

A plurality of protection areas A(1) to A(3) may be previously setwithout a muting area and the protection area A may be switched inpredetermined order. FIG. 33 is an example for explaining an example towhich such switching is applied. The optical scanning type photoelectricswitch 1 may be previously installed on the front end of a truck 130that self-travels along a decided passage inside a factory or the like,and the protection area A(1) to A(3) are switched corresponding to thestate of a passage 131. In this case, when it is assumed that threeprotection areas A(1) to A(3) are set, the order of switching of theseprotection areas A(1) to A(3) may be allowed to be previously set inconcert with an input signal from the truck 130 (an operation of thetruck 130). In this example of FIG. 33, the order of switching of theprotection area A is set to “A(1) →A(2)→A(3)→A(1)”, and this switchingof the protection area A may be allowed to be set so as to be executedbased upon, for example, a signal from the truck 130 in conjunction withorientations of tires of the truck 130.

Further, when stoppage of the truck 130 is involved in switching of theprotection area A, a function for temporality halting emission of laserlight, namely light projection halting function, may be provided. Withthis function, the safety output is turned OFF and hence an operationnon-permitting signal is supplied to the truck 130, but since the truck130 had stopped before the emission of the laser light was halted, it ispractically not inconvenient, and meanwhile it is possible to preventunnecessary interference of light with another photoelectric switch.

A Plurality of Output Systems:

As described above, the optical scanning type photoelectric switch 1 asa safety apparatus is provided with the muting function. While severalother functions have been proposed to be provided to the opticalscanning type photoelectric switch 1 similarly to the multi-optical axisphotoelectric switch and a new function may also be developed in thefuture, an interlock function can be cited as an example. The interlockfunction is a function of preventing an automatic change in safetyoutput of the optical scanning type photoelectric switch 1 from the OFFstate (operation non-permitting) to the ON state (operation permitting),and this interlock function is served to prevent unintentionalactivation or reactivation of a machine.

Further, a start-interlock function and a restart-interlock function areprepared in the optical scanning type photoelectric switch 1. Thestart-interlock function is a function of holding the safety output inthe OFF state at the time of turning-on of a power or recovery of powerafter failure thereof until the start-interlock function is manuallyreset. The restart-interlock function is a function of holding thesafety output in the OFF state at the time when the optical scanningtype photoelectric switch 1 comes into the OFF state during itsoperation until the restart-interlock function is manually reset.Further, whether or not these functions are validated or invalidated canbe individually selected in accordance with an operational mode. Forexample, both interlock functions are valid in a manual-startmanual-restart mode, the start-interlock function is valid while therestart-interlock function is invalid in a manual-start auto-restartmode, and both interlock functions are invalid in an auto-startauto-restart mode.

It is preferable that the optical scanning type photoelectric switch 1have outputs of a plurality of systems and the user be able to set avariety of safety functions, such as the muting function and theinterlock function, and an operational mode with respect to the outputof each system. FIG. 34 shows an example of this. The work robot 2 isinstalled in a danger area surrounded by the protective fence 3, andthis work robot 2 performs an operation on the work W on a work table140. This work robot 2 has work conveying tables 141 a, 141 b to itslight and left, and each work conveying table 141 a (or 141 b) is guidedby a rail 142 a (or 141 b), to self-travel backward and forward. Eachwork conveying table 141 a (or 141 b) can take a first position close tothe work robot 2 and a second position close to a port 143 which isapart from the work robot 2 and can access the outside. In this secondposition, the operator places a work on the work conveyance bench 141 a(or 141 b), and the work conveying table 141 a (or 141 b) havingreceived the work W moves to the first position. The work robot 2receives the work from the work conveying table 141 a (or 141 b) in thefirst position, and processes the received work W on the work table 140.

In the vicinities of the right and left ports 143 a, 143 b, protectionareas A(a), A(b) are respectively set by the optical scanning typephotoelectric switch 1. In this optical scanning type photoelectricswitch 1 inputted are signals from first and second mute sensor 101 a(or 101 b), 102 a (or 102 b) arranged in the vicinity of each port 143 a(or 143 b).

The optical scanning type photoelectric switch 1 has first and secondoutput systems 145, 146, the first output system 145 is connected to adrive source of the work conveying table 141, and the second outputsystem 146 is connected to a drive source of the work robot 2. Thesecond output system 146 of the optical scanning type photoelectricswitch 1 has the muting function (FIG. 35). The first output system 145outputs an OFF signal as the safety output toward the work conveyingtable 141 when the object M (e.g. operator) enters the protection areaA. The muting function is set in the second output system 146, and whilethe muting function is working, even when, for example, the operatorenters the protection area A, an ON signal (safety signal) as the safetyoutput is outputted to the work robot 2 regardless of sensing of theentry.

The muting function of the optical scanning type photoelectric switch 1is operated when the first and second mute sensors 101 a (or 101 b), 102a (or 102 b) sense the work conveying table 141 a (or 141 b), and theoperation of the muting function is halted when the first and secondmute sensors 101 a (or 101 b), 102 a (or 102 b) do not sense the workconveying table 141 a (or 141 b).

Returning to FIG. 34, FIG. 34 shows a state where the right-hand workconveying table 141 a is located in the second position and theright-hand port 143 a is closed by the right-hand work conveying table141 a. This right-hand work conveying table 141 a brings the first andsecond mute sensors 101 a, 102 a into a light interrupting state, andthereby, the second output system 146 of the optical scanning typephotoelectric switch 1 is on mute. Therefore, even when the operatorenters the right-hand protection area A(a) and places the work on theright-hand work conveying table 141 a or receives the already processedwork W on the right-hand work conveying table 141 a, the safety signalis supplied to the work robot 2 due to the second output system 146being on mute, and the work robot 2 can perform an operation . On theother hand, the first output system 145 generates an warning signal dueto the entry of the operator into the protection area A(a) and outputsthe warning signal to the right-hand work conveying table 141 a, therebybringing the right-hand work conveying table 141 a into anoperation-halted state. Reasonably, even when the right-hand workconveying table 141 a receives the warning signal from the opticalscanning type photoelectric switch 1, it is not inconvenient since thestate of the right-hand work conveying table 141 a being in the haltedstate in the vicinity of the right-hand work port 143 a remainsunchanged, and meanwhile, it is possible to prevent an abrupt operationof the right-hand work conveying table 141 a, so as to prevent an entrypath toward the inside of the protective fence 3 from being created byopening of the right-hand port 143 a having been closed by the workconveying table 141 a.

The left-hand work conveying table 141 b is located in a positionadjacent to the work robot 2 and the left-hand port 143 b is in an openstate. Since an area in the vicinity of this left-hand port 143 b hasbeen set as the protection area A(b) by the optical scanning typephotoelectric switch 1, when the operator enters this left-handprotection area A(b), warning signals are outputted to the left-handwork conveying table 141 b and the work robot 2 through the first andsecond output systems 145, 146, and the left-hand work conveying table141 b and the work robot 2 are emergently halted.

Supposing that the optical scanning type photoelectric switch 1 only hasone output system, when this output is divided and the divided outputsof the optical scanning type photoelectric switch 1 are connected to thework conveying table 141 and the work robot 2, the muting functioncannot be used for preventing an abrupt operation of the work conveyingtable 141 a, and the work robot 2 is halted while the operator entersthe protection area A and performs an operation even though theoperation of the work robot 2 does not pose a danger on the operatorpresent in the protection area A, thereby decreasing an operation rate.When the optical scanning type photoelectric switch 1, for example, hasfirst and second output systems and even when the muting is set by theoptical scanning type photoelectric switch 1, it is possible to makesuch a setting that the muting function works only in the second outputsystem connected to the work robot 2 and the muting function does notwork in the first output system 145 connected to the work conveyingtable 141, so as to raise the operation rate of the work robot 2 whileensuring the safety.

Further, other than the foregoing example, for example when the workconveying tables 141 a, 141 b and the work robot 2 are synchronouslyoperated and an electric cramp, not shown, for holding the work W isinstalled on each of the work conveying tables 141 a, 141 b, theforegoing first output system 145 is connected to a power source of theelectric cramp and the foregoing second output system 146 is connectedto the work robot 2 and the right-hand work conveying table 141 a whichare synchronously operated, thereby allowing the operator to safelyreceive and pass the work W from and to the electric cramp, change thework W, and remove the work W from the electric cramp, while the workrobot 2 is put in operation. It is to be noted that, differently fromthe foregoing example, the right-hand port 143 a having been closed bythe work conveying table 141 a, is opened due to an abrupt operation ofthe work conveying table 141 a, which may cause creation of the entrypath toward the inside of the protective fence 3. However, in this case,the muting state is reset since the mute sensor 101 comes into thenon-sensing state (light entering state). Therefore, at the time pointof resetting the muting, the work robot 2 and the work conveying table141 a are emergently halted, so that the safety of the operator can beensured.

Here, the emergency halt means validation of the restart-interlockfunction, and the restart-interlock function has been validated on thesecond output system 146. In the foregoing two examples, when the secondoutput system 146 comes into the OFF state, the right-hand port 143 ahaving been closed by the work conveying table 141 a is opened, whichmay cause creation of the entry path toward the inside of the protectivefence 3. Therefore, after the second output system 146 has come into theOFF state due to the operator having entered the protection area A, eventhough the optical scanning type photoelectric switch 1 regards theoperator as having left the protection area A, it cannot verify whetherthe operator has left for the outside of the protective fence 3 or hasentered the inside of the protective fence 3 through the entry pathalthough it can verify non-presence of the object M in the protectionarea A. For this reason, a machine (danger source) connected to thesecond output system 146 is not automatically restarted, and the opticalscanning type photoelectric switch 1 determines whether or not to bringthe second output system 146 into the ON state until accepting a manualresetting input after artificial safety verification by a person.

On the other hand, since the first output system 145 is in the OFF stateeven with the operator performing the normal operation and the entrypath is closed by the work conveying table 141 a in the normal state,when non-presence of the object M in the protection area A can beverified by the optical scanning type photoelectric switch, the operatorcan be regarded as having left for the outside of the protective fence3, whereby it is preferable that the machine (danger source) connectedto the first output system 145 be automatically restarted. That is,since the machine (danger source) has been normally halted, it ispreferable that the machine (danger source) be automatically restartedat the stage of the operator leaving the protection area A, and anoperation efficiency is also favorable. Accordingly, the first outputsystem 145 may be set on a mode for invalidating the restart-interlockfunction, namely the manual-start auto-restart mode or the auto-startauto-restart mode. As opposed to this, the second output system 146involves the emergency halt, and it is thus not desirable the machine(danger source) be automatically restarted even when the operator leavesfrom the protection area A. It is therefore preferable to operate thesecond output system 146 on the manual-start manual-restart mode byvalidating the restart-interlock function thereon. In addition, it maybe configured such that, when any one output system on which theinterlock function has been validated, out of a plurality of outputsystems, comes into the OFF state, it is regarded as the emergency haltand the other output systems are also brought into the OFF state. Thiscan provide the convenience of the automatic restart in the normaloperation and also brings all the output systems into the OFF state atthe time of the emergency halt, and the state remains unchanged to theON state at least until a manual resetting input is made, so that thesafety can be ensured.

As describe above, concerning a variety of functions and modes settableby the user in the optical scanning type photoelectric switch 1, sincethe optical scanning type photoelectric switch 1 has a plurality ofoutput systems and can be set with a function and a mode with referenceto each of the output systems, a single optical scanning typephotoelectric switch 1 is capable of rationally dealing with variousstates.

Further, although the example was shown where one protection area A(1)is set, this is not restrictive, and protection areas may be separatelyallocated with respect to the first and second output systems 145, 146by the user's setting. In the case of a configuration to separatelyallocate the protection areas, it may be configured such that a settingof one protection area can be reflected to a setting of the otherprotection area so as to set the protection areas in the identical shapeand position, or it may be configured such that a setting mode isprovided for setting the protection areas in the identical shape andposition. Further, each of the first and second output systems 145, 146is preferably configured of two outputs (OSSD1, OSSD2, OSSD3, OSSD4)showing the identical output states (ON state/OFF state). When in the ONstate, each output is superimposed with a self-diagnosis pulse, namelyan inspection signal, with which the state changes from the ON state tothe OFF state instantly (in such a length of time as to prevent anexternal device connected to each output from recognizing the change inoutput to the OFF state), and the failure sensing device 58 verifieswhether each output can be turned OFF at any time. Further, as shown inFIG. 36, a timing at which the self-diagnosis pulse as the inspectionsignal is superimposed is made different among each output. That is, itis preferably configured such that the superimposition at differenttimings in a time-division manner allows the failure sensing device 58to verify that each output has not been shot-circuited. In other words,even in occurrence of a short circuit among the safety outputs, afailure can be sensed.

When a safety signal indicating permission of an operation is beingoutputted, based upon an inspection signal superimposed on this safetysignal, the safety detection device using a self-diagnosis pulsedetermines whether or not a safety signal indicating non-permission canbe outputted in units of the output device (OSSD), and when determiningthe signal cannot be outputted (output impossible), the safety signalindicating non-permission of the operation is outputted in place of thesafety signal indicating permission of the operation, so that anotheroutput device (OSSD) in the same output system outputs the safety signalindicating non-permission of the operation to the external machine(danger source), whereby the external machine can recognize that thesafety cannot be verified due to acceptance of the operationnon-permitting signal or the inconsistency of the ON/OFF logic of theoutput devices (OSSD) in the identical output system. This ensures thesafety of the optical scanning type photoelectric switch 1.

A Plurality of Output Systems and Individual Settings of DetectionCapabilities:

When the optical scanning type photoelectric switch 1 includes aplurality of output systems, a detection capability including adetection sensitivity may also be made settable by the user with respectto each of the output systems. As also illustrated in FIG. 2, setting ofthe detection capability with respect to each output system isspecifically described. It is assumed that a first protection area A1set with a normal capability as the detection capability (normalcapability) and a second protection area A2 set with a high capabilitywhile including the periphery of the first protection area A1 have beenset by the user. In this case, such a setting can be made that the drivesource (motor) of the machine (robot) operates at a normal speed when asecond safety output corresponding to the second protection area A2 isin the ON state, and the drive source (motor) of the machine (robot)operates at a low speed when the second safety output corresponding tothe second protection area A2 is in the OFF state. Meanwhile, such asetting can be made that power is supplied to the drive source (motor)of the machine (robot) when a first safety output corresponding to thefirst protection area A1 is in the ON state, and the power is notsupplied to the drive source (motor) of the machine (robot) when thefirst safety output corresponding to the first protection area A1 is inthe OFF state. Especially in the case of a machine that operates at ahigh speed or a machine with high inertial force (high inertia), sincethe motor cannot be suddenly halted even when the power supply to themotor is interrupted, the operation of the motor is changed to alow-speed operation upon sensing of the object (object M) in the secondprotection area A2 expanded farther from the first protection area A1with respect to the machine, thereby facilitating to suddenly halt themachine (motor) at the point of sensing of the object (object M) in thefirst protection area A1. Accordingly, making the detection capabilitysettable by the hand of the user with respect to each of the two outputsystems can accelerate the speed at which the machine performs thenormal operation while the safety remains ensured.

Here, other than the detection sensitivity, examples of the settabledetection capability include response time, a minimal detected object,and a light reception sensitivity. The response time is a settingcondition corresponding to predetermined time or the time taken for apredetermined number of times of successive sensing of the object Minside the protection area A when the optical scanning typephotoelectric switch 1 determines the presence of the object M insidethe protection area A only after the lapse of the predetermined time orafter the predetermined number of times of successive sensing.Therefore, the detection capability becomes high when the response timeis short, and the detection capability becomes low when the responsetime is long. The minimal detected object is an object of the minimalsize among objects of sizes reliably detectable by the optical scanningtype photoelectric switch 1, and depends upon an optical axis density ofthe optical scanning type photoelectric switch 1. The detectioncapability becomes high when the set minimal detected object is small(the optical axis density is high), and the detection capability becomeslow when the set minimal detected object is large (the optical axisdensity is low). For example, it is configured such that the number ofoptical axes for detecting an object in every scanning is set and theoptical scanning type photoelectric switch 1 determines the presence ofthe object M inside the protection area A only after sensing the objectM with the optical axes in the number not smaller than the set number,thereby making it possible to practically change the optical axisdensity, so as to change the detection capability. The light receptionsensitivity means a gain of a light reception signal or a threshold withrespect to the light reception signal. The detection capabilityincreases by decreasing the gain or decreasing the threshold, and thedetection capability decreases by decreasing the gain or increasing thethreshold.

Although the respective relations of the detection capability and thesafety function (muting function etc.) with the plurality of outputsystems were separately described, it goes without saying that thedetection capability and the safety function can be combined and thenset with respect to each output system. As for the individual setting ofthe detection capability with respect to each of a plurality of outputsystems, the setting is naturally effective not only in the opticalscanning type photoelectric switch 1, but also in safety apparatusessuch as the multi-optical axis photoelectric switch and the singleoptical axis photoelectric switch. For example, the multi-optical axisphotoelectric switch is installed horizontally to the ground, one or aplurality of optical axes on the side closer to the machine (dangersource) are allocated to the first safety output, and one or a pluralityof optical axes on the side farther from the machine (danger source) areallocated to the second safety output, whereby, as in the above example,the first safety output can be set to have a normal detection capabilityand the second safety output can be set to have a relatively highdetection capability. Here, it is as described above that the detectioncapability here means the response time, the minimal detected object,the light reception sensitivity, or the like.

On the other hand, as for the individual setting of the safety functionwith respect to each of a plurality of output systems, the setting iseffective in a safety apparatus capable of detecting a position of theobject M such as the optical scanning type photoelectric switch, andother than the optical scanning type photoelectric switch, a safetyimage switch can be cited. In the case of a safety image switch with animage element built therein, protection areas may be set with respect tothe first and second safety outputs on a picked up two-dimensionalimage, or a protection space may be set with respect to athree-dimensional maximum protection space recognized fromtwo-dimensional images picked up by one or a plurality of safety imageswitches, thereby to individually set the safety function with respectto each of the first and second output systems.

Although the optical scanning type photoelectric switch 1 is configuredin the above example so as to set the safety function such as the mutingfunction or the interlock function or set the detection capability suchas the response time, the minimal detected object or the light receptionsensitivity with respect to each of the plurality of output systems, itmay further be configured such that a condition of reflecting an outputstate of another output system as it is and independently setting only asuperposed self-diagnosis pulse with respect to each output can beselected, or such that a setting of a condition of fixing the outputsystem to the OFF state can be selected by the user. The same alsoapplies to the safety image switch.

Countermeasure Against Interference Between Photoelectric Switches:

As described above with reference to FIG. 33, for example in the case ofmounting the optical scanning type photoelectric switch 1 on thetravelling truck 130, when another optical scanning type photoelectricswitch 1 is installed in the vicinity of the passage 131, there is apossibility of occurrence of interference between the optical scanningtype photoelectric switch 1 on the truck 130 and another opticalscanning type photoelectric switch 1 fixed in the vicinity of thepassage 131 in the process of movement of the travelling truck 130.Naturally, this is a mere example, and there is also the possibility ofoccurrence of the interference problem between the optical scanning typephotoelectric switches 1 mounted on a plurality of travelling trucks 130when those trucks 130 mutually approach. As another example, there canalso be cited a case of occurrence of the interference problem between aplurality of fixed optical scanning type photoelectric switches 1. Thisproblem is not restricted to one between the optical scanning typephotoelectric switches 1, but the interference problem may also occureven between the optical scanning type photoelectric switch 1 andanother kind of photoelectric switch (synonymous with a photoelectricsensor).

FIG. 37 shows a case where light projected by each one of adjacent twooptical scanning type photoelectric switches 1A, 1B enters the other tocause interference and an example where laser light reflected by asurrounding structure enters each switch to cause interference, and FIG.38 is a time chart for projection light pulses when the adjacent opticalscanning type photoelectric switches 1A, 1B interfere with each other.When the interference problem occurs between the adjacent opticalscanning type photoelectric switches 1, 1, it becomes a cause ofinducing a problem of preventing accurate calculation of the distance tothe object (object M).

The optical scanning type photoelectric switch 1 is set so as to beoperated with the following parameters:

(1) As described above, the optical scanning type photoelectric switch 1is provided with the photoelectric rotary encoder 25 by means of thetheory of light passing through a plurality of slits equally spaced in acircumferential direction, and the timing for light projection of thelight projecting element LD is defined using an output of the rotaryencoder 25. Therefore, an angular resolution is 0.36 degrees asdescribed above; (2) a rotation period (scanning period) is 30 ms; and(3) a light projection period is 30 μs. Namely, when light is projectedat every 0.36 degrees in a 360-degree turn, a total of 1000 times oflight projection operations are executed in the 360-degree turn. When 30ms is set as the rotation period (scanning period) in one turn, thelight projection period is {300 ms/1000}, namely 30 μs. The scanningperiod, namely a period of one turn of the scanning mirror 14 is definedby a rotation speed of the motor 24.

FIG. 39 shows a situation where the optical scanning type photoelectricswitch 1 radially projects laser light from the center of the opticalaxis. FIG. 40 is a time chart for the light projection pulse. FIG. 41illustrates the light projection pulses, each in the time range of FIG.40, until the lapse of about 30 ms (one turn period).

One technique for avoiding interference between the optical scanningtype photoelectric switch 1 and a photoelectric switch (synonymous witha photoelectric sensor) adjacent thereto is shown in FIG. 42. FIG. 42shows a time chart for light projection pulses of first and secondoptical scanning type photoelectric switches 1A, 1B. As can beunderstood from this FIG. 42, as for light projection pulse periods ofthe first and second optical scanning type photoelectric switches 1A,1B, the period is set to 30 μs in the first optical scanning typephotoelectric switch 1A while the period is set to 33 μs in the secondoptical scanning type photoelectric switch 1B. Pulse widths of the lightprojection pulses of those switches are the same, and making the pulsewidths the same can suppress an influence of the detection sensitivity.In this manner, by setting the light projection periods differentbetween the first and second optical scanning type photoelectricswitches 1A, 1B, even if mutual interference occurs between any opticalaxes, a phase difference of 36 degrees in rotation period is generatedtherebetween in a next scan, and hence the interference does not occurin succession in a plurality of times of scanning. In this connection,generally in the photoelectric switch, an output is changed only after aplurality of times of sensing in order to avoid an erroneous operationdue to noise or a suspended matter, and therefore, setting lightprojection periods different between a plurality of photoelectricswitches can practically prevent erroneous detection due to interferencebetween adjacent photoelectric switches. It is to be noted that,generally in the optical scanning type photoelectric switch 1, reflectedlight is received on the scanning mirror 14 and the light is thencollected on the light receiving lens 20 to acquire a light receptionsignal, and therefore, generally speaking, the interference problem doesnot take place so long as there is a displacement in orientation betweenthe optical scanning type photoelectric switches 1 even when light arereceived at the same timing.

FIG. 43 shows a diagram showing in the form of a block diagram a basicconfiguration of the optical scanning type photoelectric switch 1, andthe optical scanning type photoelectric switch 1 of this FIG. 43 isprovided with the foregoing two output systems (FIG. 35). A rotationspeed of the motor 24 may be set as the light projection pulse period,and for this, the light projection/reception timings of the controldevice 30 may be set, typically using an external PC. Naturally, thelight projection/reception timings may also be made settable such thatset items are displayed in the liquid crystal display section 34 of theoptical scanning type photoelectric switch 1 and the user operates theoperation button 36. The set light projection/reception timings, namelylight projection/reception periods, are stored into an internal memory147 along with the set protection area A and the like.

FIG. 44 is a diagram for explaining a second technique for avoidinginterference among a plurality of photoelectric switches. This exampleof FIG. 44 is taken on the assumption that first to fourth opticalscanning type photoelectric switches 1A to 1D are mutually connectedthrough a synchronous line. In other words, timings of each of the firstto fourth optical scanning type photoelectric switches 1A to 1D aredefined by signals from the synchronous line, and setting a phasedifference among light projection pulses can prevent interference amongthe first to fourth optical scanning type photoelectric switches 1A to1D. When the timing for capturing a light reception signal after lightprojection by the optical scanning type photoelectric switch 1 isgenerally 2 μs, setting 3 μs as the phase difference can resolve theinterference problem.

FIG. 45 is a diagram for explaining a third technique for avoidinginterference between a plurality of photoelectric switches. This exampleof FIG. 45 is to propose that, when interference occurs between theadjacent two photoelectric switches 1, 1 and this is then sensed, aphase difference be set by changing light projection timings of a nextoptical axis or afterward of either or both of the optical scanning typephotoelectric switches. As a technique for sensing the interference, forexample when light reception is detected on a specific optical axisdiscontinuously, but not a plurality of times in succession, and afrequency of such non-detection is not smaller than a predeterminedfrequency, this may be considered as interference between thephotoelectric switches. Naturally, as a modified example, such controlmay be added as to change the light projection pulse period or the lightprojection period (rotation speed of the motor 24), described concerningFIG. 42, upon sensing of interference. As for detection of interference,on top of the foregoing examples, such control may be added as to changethe light projection pulse period or the light projection period(rotation speed of the motor 24) upon determination of the possibilityof interference based upon a time difference t from light projection tolight reception, as described later with reference to a flowchart ofFIG. 51.

The foregoing three techniques are techniques of making the rotationspeed of the motor 24 different between the adjacent optical scanningtype photoelectric switches 1, 1, to make the scanning period differenttherebetween in order to prevent interference therebetween, and as amodified example, when the light projection timing of the opticalscanning type photoelectric switch 1 is clock-controlled, the lightprojection timing period may be made different between the adjacentoptical scanning type photoelectric switches 1, 1. Namely, such aconfiguration may be adopted where the light projection pulse period maybe made different between the adjacent optical scanning typephotoelectric switches 1, 1.

Further, concerning the change in setting of the rotation speed of themotor 24 or the light projection pulse period of the optical scanningtype photoelectric switch 1, such a change may not be made by means ofthe external personal computer PC, but may be allowed to be made bymeans of the liquid crystal display section 34 and the operation button36 of the optical scanning type photoelectric switch 1 without theexternal personal computer PC as described above. As described laterwith reference to FIG. 48, while this photoelectric switch 1 is capableof setting several parameters by means of the liquid crystal displaysection 34 and the operation button 36, addition of the rotation speedof the motor 24 or the light projection pulse period as one of the setitems of the parameters can prevent the interference between theadjacent optical scanning type photoelectric switches 1, 1 by the userwithout the use of the external personal computer PC. Further, it may beconfigured such that a plurality of light projection pulse periods or aplurality of light projection pulse periods are previously stored intothe internal memory 147 (FIG. 43) of the optical scanning typephotoelectric switch 1 and a desired light projection pulse period or aplurality of light projection pulse periods may be arbitrarily selectedand then set by the user out of the stored periods. Naturally, when itis determined that interference may have occurred based upon theforegoing time difference t from light projection to light reception(FIG. 51), such control may be performed as to switch the lightprojection pulse period or the light projection period (rotation speedof the motor 24) to another light projection pulse period or lightprojection period (rotation speed of the motor 24) stored in theinternal memory 147.

Although the technique for resolving the problem of the interferencewith another photoelectric switch (photoelectric switch) was describedwith reference to FIGS. 37 to 45, there is a problem other than this,which is a problem due to disturbance light. When disturbance light issuperimposed on reflected light of the optical scanning typephotoelectric switch 1, this tends to lead to a problem of detectingerroneously positional information. In order to deal with the problem,the optical scanning type photoelectric switch 1 (1) has adopted thelight transmitting cover 62 with the function of the optical filter, and(2) has adopted the filter circuit to remove a signal with a frequencycomponent other than reflected light from the object (object M), but theproblem has not been completely dealt with.

When an influence may be exerted by disturbance light, the user adjustsan angle or a height at which the optical scanning type photoelectricswitch 1 is installed, and at the time of this adjustment, it isadvantageous to verify from which direction the disturbance light isincident. Further, when it is verified whether or not the influenceexerted by the disturbance light disappears after the adjustment, itbecomes unnecessary to repeat adjustment of an installation position ofthe optical scanning type photoelectric switch 1 in each occurrence oferroneous operation of the optical scanning type photoelectric switch 1.As described above, since the photoelectric switch is generally set soas to change an output after sensing that values of measurement made aplurality of times, namely measured distance values, are successivelyinside the protection area A, even though the disturbance light does notimmediately induce an erroneous operation, the optical scanning typephotoelectric switch 1 may be operated with its detecting capability ina deteriorated state (with the response time in an extended state),which is not preferable for the optical scanning type photoelectricswitch 1 as the safety apparatus.

The optical scanning type photoelectric switch 1 has three operationalmodes: (1) an “operation mode”; (2) a “monitor mode”; and (3) a “settingmode”. When the operational mode is switched, the display in the liquidcrystal display section 34 of the optical scanning type photoelectricswitch 1 is switched to a display of FIG. 46. FIG. 46 is a transitiondiagram for the display of the liquid crystal display section 34, wherereference symbol 34(a) denotes a display during operation on theoperation mode, reference symbol 34(b) denotes a menu screen of themonitoring mode, and reference symbol 34(c) denotes a menu screen of thesetting mode.

Referring to foregoing FIG. 6B, in the user interface section 32, theoperation buttons 36 a to 36 e are arranged adjacently to the liquidcrystal display section 34. The upper and lower buttons 36 a, 36 b arekeys for inputting a numerical value and switching a display screen. Forexample, the upper button 36 a can be used as an up-key for increment.Further, the lower button 36 b can be used as a down-key for decrement.Three operation buttons 36 c to 36 e are arranged adjacently alongsidebelow the liquid crystal display section 34, and these operation buttons36 c to 36 e are used as keys for switching the operational mode anddeciding a set value. For example, the central operation button 36 c canbe used for switching the mode, the right operation button 36 e is anenter (Enter) key, and the left operation button 36 d is an escape (Esc)key.

When the “operation mode” is selected, the optical scanning typephotoelectric switch 1 executes sensing of the entry object M. A shiftfrom the “operation mode” to the “monitor mode” can be made by operatingthe central operation button 36 c. Further, during operation on the“monitor mode”, the mode can be returned to the “operation mode” byoperating the left operation button 36 d (Esc key).

With reference to FIG. 47, the “monitor mode” is the operational modefor displaying an input/output state, an area monitoring status, sensinghistories, and the like. As the input/output state, a safety outputstate of the optical scanning type photoelectric switch 1, an inputstate from an external relay circuit, and the like can be displayed inthe liquid crystal display section 34 for monitoring. As the areamonitoring status, a shape and a size of a set monitoring area, adistance to a sensed entry object, and the like can be monitored. As thesensing histories, a position of an entry object having become a triggerfor outputting an operation non-permitting signal, the time of sensingof the object, error information and the like are held as sensinghistories at the time of the safety output being OFF. In histories ofthe error information, the time of turning-OFF of the safety output anda factor for the turning-OFF (a cause of the turning-off of the safetyoutput) are included, and when the safety output is turned OFF due todisturbance light, an optical axis number that defines a direction ofthe disturbance light is included in the error information histories.

The sensing histories can be displayed in succession from the latestone. As for such sensing histories, 20 records are held at the maximum,and the oldest sensing history is sequentially cleared every time a newone is obtained. As positional information of the entry object, forexample, a numerical value indicating a position of the entry object isdisplayed by means of an orthogonal coordinate with the optical scanningtype photoelectric switch 1 at the center. Alternatively, a numericalvalue indicating a distance D from the safety sensor 1 to the entryobject is displayed. Further, as the error information, for example,information showing occurrence of a defect due to contamination of thelight transmitting cover 62, an output short circuit, or the like isdisplayed. Moreover, as the history information, other than thepositional information and the error information, information showing acheck input from the external equipment is present. This check input isan external input for verifying whether or not the safety output isproperly turned OFF.

The “setting mode” is the operational mode for performing a setting ofparameters for designating the protection area A as well as a setting ofan external input. A shift from the “operation mode” to the “settingmode” can be made by operating the central operation button 36 c.Further, during operation on the “setting mode”, the mode can bereturned to the “operation mode” by operating the left operation button36 d (Esc key). In a setting start screen, selectable menu items arearranged, and a desired menu item can be selected by operating the upperand lower operation buttons 36 a, 36 b.

FIG. 48 shows an example of a display screen concerning settings ofparameters on the setting mode. Parameters whose settings are changeableinclude a restart setting, an EDM, a sensing resolution, a responsetime, and the like. As for the restart, whether the optical scanningtype photoelectric switch 1 is restarted manually or automatically canbe selected. As for the EDM, whether an external relay monitoringfunction is turned ON or OFF can be selected. The sensing resolution ofthe entry object (object M) can be arbitrarily designated within apredetermined range.

The histories of the error information can be verified by the externalpersonal computer PC (FIG. 13) connected to the optical scanning typephotoelectric switch 1. An application for displaying histories of errorinformation is installed in the external personal computer PC, and usingthis program, the histories of the error information can be displayed onthe display 81 of the personal computer PC.

FIG. 49 shows a screen display of disturbance light included in adisplay of error information by means of the personal computer PC. Onthe display 81 of the personal computer PC, on its one side, historiesof error information are displayed in a time-series manner. Thislist-display includes, with respect to each piece of the errorinformation: (1) a cause of an error; (2) an error occurrence time; and(3) preferably, a number of an optical axis where the error occurred.When the user selects an arbitrary error history, a direction ofdisturbance light is displayed with a striking color along with a symbolS of the optical scanning type photoelectric switch 1. Whether thisdisplay concerning disturbance light is continuously displayed or it isnot continuously displayed but displayed when requested by the user maybe made optionally settable. FIG. 49 illustrates a display example ofthe display 81 of the personal computer PC when the optical scanningtype photoelectric switch 1 connected with the personal computer PC isin an operating state, which is a state where the operation of theoptical scanning type photoelectric switch 1 is continuously monitoredby the personal computer PC. In this FIG. 49, black circles seen aroundthe symbol S of the optical scanning type photoelectric switch 1indicate histories of a cause location at the time when the safetyoutput comes into the OFF state, for example, histories of a positionwhere the object M was detected inside the protection area A. In FIG.49, disturbance light are seen in a large number in a hatched regionexpanding in sectoral shape upward from the symbol S, and thisdisturbance light is displayed with a straight line radiating from thesymbol S. Therefore, the user can see a direction of the disturbancelight by looking at the straight line radiating from the symbol S.

Further, when disturbance light is detected as described next, it ispreferable to display this with letters in the liquid crystal displaysection 34 of the optical scanning type photoelectric switch 1 as“Alert, Light Interference”, as illustrated in FIG. 50.

A method for sensing disturbance light is displayed. When projectedlight is hit to the object (object M) and reflected thereon, the opticalscanning type photoelectric switch 1 measures a distance based upon atime difference t between the light projection timing and the lightreception timing, and senses a direction by means of an optical axisnumber of light received. Further, the optical scanning typephotoelectric switch 1 is generally designed to correct the measureddistance by means of a light reception intensity so as to enhance theaccuracy in sensing the distance. Therefore, when the time difference tbetween the light projection timing and the light reception timing iswithin a predetermined range, the light can be regarded as lightreflected by the object (object M) and as regular light. In other words,when the time difference t between the light projection timing and thelight reception timing is very small, the light can be regarded asdisturbance light. Further, also when the time difference t between thelight projection timing and the light reception timing is very large,the light can be regarded as disturbance light. Therefore, when the timedifference t between the light projection timing and the light receptiontiming is out of the predetermined range, namely when the timedifference t is smaller than the predetermined range or the timedifference t is larger than the predetermined range, it is stored intothe error history, and an error display is made in the liquid crystaldisplay section 34 of the optical scanning type photoelectric switch 1.Moreover, when the optical scanning type photoelectric switch 1 isprovided with an indicator indicating a direction, a direction ofdisturbance light is preferably displayed with this indicator.

What is problematic in ensuring the safety is the case of the timedifference t between the light projection timing and the light receptiontiming being smaller than the predetermined range, and in this case, inthe optical scanning type photoelectric switch 1, it is preferable toexecute processing of shifting the output state of the optical scanningtype photoelectric switch 1 to the OFF state.

FIG. 51 is a flowchart showing an example of a specific technique forsensing disturbance. As described above, light projection is executed ina predetermined period (Step S10), and it is determined whether or notlight is received with reference to each optical axis number (Step S11).When light is received, a time difference t from light projection tolight reception of a corresponding optical axis number is calculated(Step S12), and it is determined whether or not this time difference tis included in a range between previously set minimum time differenceTmin and maximum time difference Tmax (Step S13). When the determinationresult is “YES”, namely when the actual time difference t is within thepredetermined range, the process goes to Step S14, and in the samemanner as conventionally done, a position of (distance to) the object(object M) is measured. It is to be noted that the direction of theobject (object M) can be defined by the optical axis number, namelylight projection time. When the object (object M) is located in theprotection area, the process moves from Step S15 to Step S16, where theoutput of the optical scanning type photoelectric switch 1 is shifted tothe OFF state, and in Step S 17, an OFF history is created and thenstored into the memory 147 (FIG. 43). When the object (object M) islocated in the warning area, the process moves from Step S18 to StepS19, where an alert is made to an operator having entered the warningarea by, for example, lighting of a red lamp or sounding of an alarm.

In Step S13, when it is determined that the time difference t from lightprojection to light reception is out of the range between the minimumtime difference Tmin and the maximum time difference Tmax, theabnormality is determined. That is, Step S13 constitutes an abnormalitydetermining device, and when the abnormality is determined, the processgoes to Step S20, where an error history is created and then stored intothe memory 147 (FIG. 43). Further, in Step S21, when the time differencet from light projection to light reception is smaller than the minimumtime difference Tmin, this can be regarded as a phenomenon in an areaclose to the optical scanning type photoelectric switch 1, and is thusconsidered as having the potential for inhibiting the safety, wherebythe process goes to Step S22, where the output of the optical scanningtype photoelectric switch 1 is shifted to the OFF state, and in StepS23, an OFF history is created and then stored into the memory 147 (FIG.43). It is to be noted that in Step S13, when the abnormality isdetermined in Step S13, a display indicating the abnormality is made inthe liquid crystal display section 34 (FIG. 50).

By referring to the error history and the OFF history, the user candetermine with a sharp distinction whether a cause of occurrence of theproblem is a temporary factor (e.g. dust) or a continuous factor(disturbance light). When the cause is regarded as disturbance light,the direction can be specified by displaying the OFF history and theerror history as detailed disturbance information by means of theexternal personal computer PC, and hence an angle or a height at whichthe optical scanning type photoelectric switch 1 is installed can bechanged, so as to deal with the problem.

As described with reference to FIG. 50, with the liquid crystal displaysection 34 provided in the optical scanning type photoelectric switch 1,an error display can be made using the liquid crystal display section34, and when looking at the display and finding it necessary, the usercan conduct an analysis of disturbance light by means of the externalpersonal computer PC. However, as illustrated in FIG. 52, a directionindicator 160 capable of indicating a direction is provided in theoptical scanning type photoelectric switch 1, and the direction of thecause of the problem may be indicated using this direction indicator160. In this regard, on the top of the optical scanning typephotoelectric switch 1 illustrated in FIG. 52, a plurality of LEDs 160 aare equally spaced in arc shape, which are capable of indicating thedirection of the cause of the problem by lighting the LED indicator 160that agrees with the direction.

Specific Adjustment Procedure for Detection SensitivityHolding/Adjusting Mechanism of Optical Scanning Type PhotoelectricSwitch 1:

With reference to FIGS. 9 to 12, the foregoing detection sensitivityholding/adjusting mechanism is specifically described. This detectionsensitivity holding/adjusting mechanism includes as reference objectstwo first and second reflection surfaces 73, 74 with differentreflection factors inside the optical scanning type photoelectric switch1. The optical scanning type photoelectric switch 1 has been adoptedwith such a configuration where the first and second reflection surfaces73, 74 as the reference objects are arranged in an invalid range, namelya range other than the measurement area, in the rotation of the scanningmirror 14, and thereby a light projection path, a light reception path,a laser light source LD and a light receiving element (photoelectricconversion element) 22, which are used for scanning in the measurementarea, are shared. It is therefore possible, by projecting light to thereference objects (first and second reflection surfaces 73, 74) in theinvalid rotation range, other than the measurement area, of the scanningmirror 14 and monitoring light reception signal information therebyobtained, to verify deterioration in detection sensitivity of theoptical scanning type photoelectric switch 1.

At the time of shipment of the optical scanning type photoelectricswitch 1 from a factory, a light projection intensity and/or a lightreception gain are adjusted such that an optimal detection sensitivitythat can satisfy a product application is obtained when a scanning rangewhere the light transmitting cover 62 is not sensed, namely the firstand second reflection surfaces 73, 74, is scanned with pulse-shapedlaser light. In a state where this adjustment has been completed, forexample when a light reception intensity is “600” at the time of lightprojection to an optical axis number of “60” (this optical axis number“60” corresponds to an optical axis number at the time of lightprojection to the second reflection surface (white) 74), the lightreception intensity “600” of the optical axis number 60 is stored intothe memory 147 (FIG. 43). Further, for example when a light receptionintensity is “100” at the time of light projection to an optical axisnumber of “10” (this optical axis number “10” corresponds to an opticalaxis number at the time of light projection to the first reflectionsurface (black) 73), the light reception intensity “100” of the opticalaxis number 10 is stored into the memory 147 (FIG. 43).

The above procedure at the time of factory shipment is described basedupon FIG. 53. First, in Step S100, light reception signal information,which is obtained when pulse laser light is projected to an objectthrough the light transmitting cover 62, is acquired, and the distanceto the object is measured. Then in Step S101, it is determined whetheror not the object can be sensed. When the determination result is “NO”,the process goes to Step S102, where the light projection drivingsection 150 (FIG. 43) is controlled to increase a light projectionintensity and/or increase a voltage of the power supply circuit 152(FIG. 43), so as to increase a light reception gain of the lightreceiving element 22, and the process again goes to Step S100, where thedistance to the object is measured based upon the light projectionintensity and/or the light reception gain after the adjustment. When itis determined in Step S101 that the object has been sensed, the processgoes to Step S103, where light reception signal information, which isobtained when pulse laser light is projected to the object through thelight transmitting cover 62, is acquired, and the distance to the objectis measured.

In next Step S104, it is determined whether or not the lighttransmitting cover 62 has been sensed, and when the determination resultis “YES” in Step S104, the light projection driving section 150 (FIG.43) is controlled to decrease the light projection intensity and/ordecrease the voltage of the power supply circuit 152 (FIG. 43), so as todecrease the light reception gain of the light receiving element 22, andthereafter, the process goes to Step S103, where the distance to theobject is measured based upon the light projection intensity and/or thelight reception gain after the adjustment. When sensing of the lighttransmitting cover 62 is not recognized in Step S104, it is consideredthat the light projection intensity and light reception gain have beenable to be adjusted to optimal values, and the process goes to StepS106, where a light reception intensity at the time of light projectionto the white second reflection surface 74 (referred to as “referencelight reception intensity RE (white)” is stored into the memory 147(FIG. 43). Further, in next Step S107, a light reception intensity atthe time of light projection to the black first reflection surface 73 asanother reference object (referred to as “reference light receptionintensity RE (black)”) is stored into the memory 147 (FIG. 43).

Described above is the procedure before factory shipment. Next, aprocedure for the optical scanning type photoelectric switch 1autonomically adjusting a detection sensitivity is described based uponFIG. 54. First, in Step S200, a light reception intensity, obtained atthe time of light projection to an optical axis number 50 (the whitesecond reflection surface 74 (FIG. 12)), is acquired. This lightreception intensity can be acquired through an A/D converter 154 (FIG.43) constituting a light receiving section. This acquired lightreception intensity is referred to as “actual light reception intensity(white)”. The “reference light reception intensity RE (white)” is thenfetched from the memory section 147 (Step S201), and in next Step S202,it is determined whether or not the “actual light reception intensity(white)” is smaller than the “reference light reception intensity RE(white)”. When it is discriminated as “YES” in Step S202, the “actuallight reception intensity (white)” is considered to have decreased, andthe process goes to Step S203, where the light projection drivingsection 150 (FIG. 43) is controlled to increase the light projectionintensity and/or increase the voltage of the power supply circuit 152(FIG. 43), so as to increase the light reception gain of the lightreceiving element 22. In next Step S204, it is determined whether or notthe “actual light reception intensity (white)” is larger than the“reference light reception intensity RE (white)”. When it is determined“YES”, the “actual light reception intensity (white)” is considered tohave become high, and the process goes to Step S205, where the lightprojection driving section 150 (FIG. 43) is controlled to decrease thelight projection intensity and/or decrease the voltage of the powersupply circuit 152 (FIG. 43), so as to decrease the light reception gainof the light receiving element 22.

Next, a procedure for the optical scanning type photoelectric switch 1autonomically sensing a failure is described based upon FIG. 55. First,in Step S300, a light reception intensity, obtained at the time of lightprojection to the optical axis number 10 (the black first reflectionsurface 73 (FIG. 12)), is acquired. This light reception intensity canbe acquired through the AID converter 154 (FIG. 43) constituting thelight receiving section. This acquired light reception intensity isreferred to as “actual light reception intensity (black)”. The“reference light reception intensity RE (black)” is then fetched fromthe memory section 147 (Step S301), and in next Step S302, it isdetermined whether or not the “actual light reception intensity (black)”is smaller than the “reference light reception intensity RE(black)−allowable value”. When it is discriminated as “YES” in StepS302, the “actual light reception intensity (black)” is considered tohave extremely decreased, and the process goes to Step S303, where theoptical scanning type photoelectric switch 1 is determined to be out oforder, and is thus shifted to a safety state. A typical processing forthis safety state is processing of turning OFF the output of the opticalscanning type photoelectric switch 1. Further, also when the “actuallight reception intensity (black)” is larger than the “reference lightreception intensity RE (black)+allowable value”, the processing movesfrom Step S204 to Step S303, where the optical scanning typephotoelectric switch 1 is determined to be out of order, and is thusshifted to the safety state.

1. An optical scanning type photoelectric switch, which performstwo-dimensional scanning with light to detect an object, and alsomeasures a distance to the object to sense a two-dimensional position ofthe object, the switch having inside thereof: a light projection pathalong which light emitted by a light projecting element is projectedtoward a measurement area through a trochoid first scanning mirror; alight reception path along which reflected light reflected by the objectis guided to a light receiving element through a second scanning mirrorand received by the light receiving element; and a reference objectprovided on the opposite side to the measurement area, wherein the lightprojection path from the light projecting element to the first scanningmirror and the light reception path from the second scanning mirror tothe light receiving element are shared so that light projected to thereference object and reflected by the reference object is received bythe light receiving element.
 2. The optical scanning type photoelectricswitch according to claim 1, wherein the first scanning mirror and thesecond scanning mirror are a common scanning mirror, and light isprojected and received using the same scanning mirror.
 3. The opticalscanning type photoelectric switch according to claim 1, having: astorage device for storing reference light reception signal information,which is obtained at the time of projecting light to the referenceobject, when the detection sensitivity of the optical scanning typephotoelectric switch is adjusted to the optimum; and a detectionsensitivity adjusting device capable of adjusting the detectionsensitivity of the optical scanning type photoelectric switch, whereinthe detection sensitivity of the optical scanning type photoelectricswitch is adjusted by the detection sensitivity adjusting device basedupon actual light reception signal information, which is obtained at thetime of projecting light to the reference object, and the referencelight reception signal information.
 4. The optical scanning typephotoelectric switch according to claim 1, wherein the reference objectis configured of a plurality of reflection surfaces with differentreflection factors.
 5. The optical scanning type photoelectric switchaccording to claim 4, further having; a failure detecting device fordetermining failure when actual light reception signal information,which is obtained by projecting light to the reflection surface with alow reflection factor among the reference objects, is out of apredetermined range with the reference light reception signalinformation taken as a reference, based upon the light reception signalinformation obtained from the reflection surface with a low reflectionfactor and the reference light reception signal information; and anoutput controlling device for shifting the optical scanning typephotoelectric switch to a safety state when the failure detecting devicedetermines failure.
 6. The optical scanning type photoelectric switchaccording to claim 1, wherein laser light is emitted in pulse form fromthe light projecting element.